Function at 0x463610
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x6044
call fcn.0048ab40
mov eax, dword [0x4c3c64]
xor eax, esp
mov dword [esp + 0x6040], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
push esi
mov ebx, ecx
push edi
mov dword [esp + 0x14], ebx
cmp eax, 3
je 0x4639d7
cmp eax, 2
je 0x463679
cmp eax, 1
je 0x463679
cmp eax, 4
je 0x4639d7
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6040]
xor ecx, esp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0x10
cmp eax, 4
je 0x4639d7
or esi, 0xffffffff
cmp dword [ebx + 4], esi
je 0x463691
mov edi, dword [ebx]
call fcn.00462a00
mov edi, dword [ebp + 8]
mov dword [ebx + 4], esi
mov esi, dword [ebx]
cmp edi, dword [esi + 4]
jge 0x46365d
cmp edi, dword [esi + 0x10]
jge 0x4636a8
call fcn.00462230
mov ecx, dword [ebx]
cmp dword [ecx + 0x10], edi
jge 0x4636be
nop
mov esi, dword [ebx]
call fcn.00462270
mov edx, dword [ebx]
cmp dword [edx + 0x10], edi
jl 0x4636b0
push edi
mov edi, dword [esp + 0x18]
lea ebx, [esp + 0x24]
mov ecx, edi
call fcn.00462de0
test byte [esp + 0x2024], 0x10
je 0x46374a
cmp dword [ebp + 0x14], 1
je 0x463731
mov ecx, dword [esp + 0x18]
movzx eax, word [ecx]
cmp ax, 0x2f
je 0x4636fd
cmp ax, 0x5c
je 0x4636fd
test ax, ax
je 0x463721
cmp word [ecx + 2], 0x3a
jne 0x463721
push ecx
push 0
call fcn.004634d0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6040]
xor ecx, esp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0x10
push ecx
add edi, 0x203c
push edi
call fcn.004634d0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6040]
xor ecx, esp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp + 0x14], 1
jne 0x463759
mov esi, dword [esp + 0x18]
jmp 0x46381b
mov edx, dword [esp + 0x18]
movzx eax, word [edx]
mov ebx, edx
mov ecx, edx
test ax, ax
je 0x46378b
movzx eax, ax
lea esp, [esp]
cmp ax, 0x2f
je 0x46377c
cmp ax, 0x5c
jne 0x46377f
lea ebx, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x463770
lea edi, [esp + 0x2048]
mov eax, edx
sub edi, edx
movzx ecx, word [eax]
mov word [edi + eax], cx
add eax, 2
test cx, cx
jne 0x463796
cmp ebx, edx
jne 0x463840
xor eax, eax
mov word [esp + 0x2048], ax
mov edi, dword [esp + 0x14]
push ebx
lea eax, [esp + 0x204c]
push eax
add edi, 0x203c
push edi
lea ecx, [esp + 0x4054]
push str._s_s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
lea edx, [esp + 0x2048]
push edx
push edi
call fcn.004634d0
add esp, 8
mov eax, dword [esp + 0x2024]
push 0
push eax
push 2
push 0
push 0
push 0x40000000
lea ecx, [esp + 0x4060]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, dword [esp + 0x14]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4638af
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6040]
xor ecx, esp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0x10
mov ecx, ebx
sub ecx, edx
sar ecx, 1
xor edx, edx
mov word [esp + ecx*2 + 0x2048], dx
mov ax, word [esp + 0x2048]
cmp ax, 0x2f
je 0x46387c
cmp ax, 0x5c
je 0x46387c
test ax, ax
je 0x4637b7
cmp word [esp + 0x204a], 0x3a
jne 0x4637b7
push ebx
lea eax, [esp + 0x204c]
push eax
lea ecx, [esp + 0x4050]
push str._s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [esp + 0x2058]
push edx
push 0
call fcn.004634d0
add esp, 0x18
jmp 0x4637f2
cmp dword [esp + 0x2044], 0
mov dword [esp + 0x18], 0
jle 0x463989
mov edx, dword [edi + 0x2034]
mov ebx, dword [edi]
push edx
call fcn.00462630
add esp, 4
cmp dword [edi + 0x2038], 0
jne 0x4638f2
push 0x20000
call fcn.00476b9d
add esp, 4
mov dword [edi + 0x2038], eax
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x463900
mov ecx, dword [edi + 0x2038]
lea eax, [esp + 0x13]
push eax
mov eax, dword [edi]
push ecx
mov ecx, 0x20000
call fcn.004627a0
mov edi, eax
add esp, 8
cmp edi, 0xffffff96
je 0x46395b
test edi, edi
jl 0x463969
jle 0x463942
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x2038]
push 0
lea edx, [esp + 0x20]
push edx
push edi
push ecx
push esi
call ebx
test eax, eax
je 0x463977
cmp byte [esp + 0x13], 0
jne 0x463985
test edi, edi
mov edi, dword [esp + 0x14]
jne 0x463900
mov dword [esp + 0x18], 0x5000000
jmp 0x4639a8
mov edi, dword [esp + 0x14]
mov dword [esp + 0x18], 0x1000
jmp 0x4639a8
mov edi, dword [esp + 0x14]
mov dword [esp + 0x18], 0x5000000
jmp 0x4639a8
mov edi, dword [esp + 0x14]
mov dword [esp + 0x18], 0x400
jmp 0x4639a8
mov edi, dword [esp + 0x14]
lea edx, [esp + 0x2038]
push edx
lea eax, [esp + 0x202c]
push eax
lea ecx, [esp + 0x2038]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x4639b5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
call fcn.00462a00
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6040]
xor ecx, esp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebx + 4]
mov esi, dword [ebp + 8]
cmp esi, eax
je 0x463a8d
cmp eax, 0xffffffff
je 0x4639f1
mov edi, dword [ebx]
call fcn.00462a00
mov eax, dword [ebx]
mov dword [ebx + 4], 0xffffffff
cmp esi, dword [eax + 4]
jge 0x46365d
cmp esi, dword [eax + 0x10]
jge 0x463a12
mov esi, eax
call fcn.00462230
mov esi, dword [ebp + 8]
mov edx, dword [ebx]
cmp dword [edx + 0x10], esi
jge 0x463a70
lea esp, [esp]
mov esi, dword [ebx]
test esi, esi
je 0x463a66
cmp dword [esi + 0x18], 0
je 0x463a66
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x463a66
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
lea ecx, [ecx + edx + 0x2e]
add dword [esi + 0x14], ecx
mov dword [esi + 0x10], eax
push 0
lea edx, [esi + 0x78]
push edx
lea eax, [esi + 0x28]
push eax
xor eax, eax
mov ecx, esi
call fcn.00461fc0
add esp, 0xc
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov ecx, dword [ebx]
mov edx, dword [ebp + 8]
cmp dword [ecx + 0x10], edx
jl 0x463a20
mov eax, dword [ebx + 0x2034]
mov ebx, dword [ebx]
push eax
call fcn.00462630
mov edx, dword [esp + 0x18]
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [edx + 4], ecx
mov ebx, edx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x13]
push eax
mov eax, dword [ebx]
push ecx
mov ecx, dword [ebp + 0x10]
call fcn.004627a0
mov esi, eax
add esp, 8
test esi, esi
jg 0x463ab8
mov edi, dword [ebx]
call fcn.00462a00
mov dword [ebx + 4], 0xffffffff
cmp byte [esp + 0x13], 0
jne 0x463731
test esi, esi
jle 0x463ae3
mov eax, 0x600
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6040]
xor ecx, esp
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [esp + 0x604c]
mov eax, esi
sub eax, 0xffffff96
neg eax
pop edi
sbb eax, eax
pop esi
and eax, 0x4fff000
pop ebx
xor ecx, esp
add eax, 0x1000
call fcn.00484f14
mov esp, ebp
pop ebp
ret 0x10