Function at 0x472350
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x650
mov eax, dword [0x56a260]
xor eax, esp
mov dword [esp + 0x64c], eax
push ebx
mov ebx, dword [esp + 0x65c]
push ebp
mov ebp, dword [esp + 0x668]
cmp ebp, 3
push esi
push edi
mov esi, ecx
je 0x472399
cmp ebp, 2
je 0x472469
cmp ebp, 1
je 0x472469
mov eax, 0x10000
jmp 0x472727
mov eax, dword [esi + 4]
mov edi, dword [esp + 0x664]
cmp edi, eax
je 0x472407
cmp eax, 0xffffffff
je 0x4723b7
mov eax, dword [esi]
push eax
call fcn.0046fd40
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x47238f
cmp edi, dword [eax + 0x10]
jge 0x4723d3
push eax
call fcn.0046f950
add esp, 4
mov ecx, dword [esi]
cmp dword [ecx + 0x10], edi
jge 0x4723f2
lea ebx, [ebx]
mov edx, dword [esi]
push edx
call fcn.0046f9a0
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x4723e0
mov ecx, dword [esi + 0x23c]
mov edx, dword [esi]
push ecx
push edx
call fcn.00471680
add esp, 8
mov dword [esi + 4], edi
mov ecx, dword [esp + 0x66c]
mov edx, dword [esi]
lea eax, [esp + 0x13]
push eax
push ecx
push ebx
push edx
call fcn.00471810
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x472438
mov eax, dword [esi]
push eax
call fcn.0046fd40
add esp, 4
mov dword [esi + 4], 0xffffffff
cmp byte [esp + 0x13], 0
jne 0x472511
test edi, edi
jle 0x472451
mov eax, 0x600
jmp 0x472727
mov eax, edi
sub eax, 0xffffff96
neg eax
sbb eax, eax
and eax, 0x4fff000
add eax, 0x1000
jmp 0x472727
or edi, 0xffffffff
cmp dword [esi + 4], edi
je 0x47247c
mov ecx, dword [esi]
push ecx
call fcn.0046fd40
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], edi
mov edi, dword [esp + 0x664]
cmp edi, dword [eax + 4]
jge 0x47238f
cmp edi, dword [eax + 0x10]
jge 0x47249f
push eax
call fcn.0046f950
add esp, 4
mov edx, dword [esi]
cmp dword [edx + 0x10], edi
jge 0x4724b8
mov eax, dword [esi]
push eax
call fcn.0046f9a0
mov ecx, dword [esi]
add esp, 4
cmp dword [ecx + 0x10], edi
jl 0x4724a6
lea edx, [esp + 0x1c]
push edx
push edi
mov ecx, esi
call fcn.00471be0
test byte [esp + 0x228], 0x10
je 0x472518
cmp ebp, 1
je 0x472511
movzx eax, word [ebx]
cmp ax, 0x2f
je 0x4724ef
cmp ax, 0x5c
je 0x4724ef
test ax, ax
je 0x472501
cmp word [ebx + 2], 0x3a
jne 0x472501
push ebx
push 0
call fcn.00472240
add esp, 8
xor eax, eax
jmp 0x472727
push ebx
add esi, 0x244
push esi
call fcn.00472240
add esp, 8
xor eax, eax
jmp 0x472727
cmp ebp, 1
jne 0x472524
xor ebp, ebp
jmp 0x4725c3
movzx eax, word [ebx]
xor ebp, ebp
cmp ax, bp
mov edi, ebx
mov ecx, ebx
je 0x472550
movzx eax, ax
cmp ax, 0x2f
je 0x472541
cmp ax, 0x5c
jne 0x472544
lea edi, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
cmp ax, bp
jne 0x472535
lea eax, [esp + 0x24c]
push ebx
push eax
call fcn.0046ff60
add esp, 8
cmp edi, ebx
jne 0x4725d2
mov word [esp + 0x24c], bp
push edi
lea edx, [esp + 0x250]
push edx
lea ebx, [esi + 0x244]
push ebx
lea eax, [esp + 0x460]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea ecx, [esp + 0x260]
push ecx
push ebx
call fcn.00472240
add esp, 0x1c
mov edx, dword [esp + 0x228]
push ebp
push edx
push 2
push ebp
push ebp
push 0x40000000
lea eax, [esp + 0x46c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x47263e
mov eax, 0x200
jmp 0x472727
mov ecx, edi
sub ecx, ebx
sar ecx, 1
mov word [esp + ecx*2 + 0x24c], bp
mov ax, word [esp + 0x24c]
cmp ax, 0x2f
je 0x47260c
cmp ax, 0x5c
je 0x47260c
cmp ax, bp
je 0x47256d
cmp word [esp + 0x24e], 0x3a
jne 0x47256d
push edi
lea edx, [esp + 0x250]
push edx
lea eax, [esp + 0x45c]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea ecx, [esp + 0x25c]
push ecx
push ebp
call fcn.00472240
add esp, 0x18
jmp 0x4725a1
mov ecx, dword [esi + 0x23c]
mov edx, dword [esi]
push ecx
push edx
call fcn.00471680
add esp, 8
cmp dword [esi + 0x240], ebp
jne 0x47266b
push 0x4000
call fcn.004d377b
add esp, 4
mov dword [esi + 0x240], eax
mov dword [esp + 0x14], ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x472680
mov ecx, dword [esi + 0x240]
mov edx, dword [esi]
lea eax, [esp + 0x13]
push eax
push 0x4000
push ecx
push edx
call fcn.00471810
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x4726d4
test edi, edi
jl 0x4726ca
jle 0x4726bf
mov ecx, dword [esi + 0x240]
push 0
lea eax, [esp + 0x1c]
push eax
push edi
push ecx
push ebx
call ebp
test eax, eax
je 0x4726de
cmp byte [esp + 0x13], 0
jne 0x4726e8
test edi, edi
jne 0x472680
mov dword [esp + 0x14], 0x5000000
jmp 0x472707
mov dword [esp + 0x14], 0x1000
jmp 0x472707
mov dword [esp + 0x14], 0x400
jmp 0x472707
lea edx, [esp + 0x23c]
push edx
lea eax, [esp + 0x230]
push eax
lea ecx, [esp + 0x23c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [esp + 0x670], 1
je 0x472718
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esi]
push edx
call fcn.0046fd40
mov eax, dword [esp + 0x18]
add esp, 4
mov ecx, dword [esp + 0x65c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004f2ac1
add esp, 0x650
ret 0x10