Function at 0x471370
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x4e3ec8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov esi, ecx
cmp eax, 3
je 0x4713bd
cmp eax, 2
je 0x4714a3
cmp eax, 1
je 0x4714a3
pop edi
pop esi
mov eax, 0x10000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048e770
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esi + 4]
mov edi, dword [ebp + 8]
cmp edi, eax
je 0x471427
cmp eax, 0xffffffff
je 0x4713d7
mov eax, dword [esi]
push eax
call fcn.0046ef60
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x4713a5
cmp edi, dword [eax + 0x10]
jge 0x4713f3
push eax
call fcn.0046ecd0
add esp, 4
mov ecx, dword [esi]
cmp dword [ecx + 0x10], edi
jge 0x471412
lea ebx, [ebx]
mov edx, dword [esi]
push edx
call fcn.0046ed20
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x471400
mov ecx, dword [esi + 0x138]
mov edx, dword [esi]
push ecx
push edx
call fcn.00470ea0
add esp, 8
mov dword [esi + 4], edi
mov ecx, dword [ebp + 0x10]
mov edx, dword [esi]
lea eax, [ebp - 0x339]
push eax
push ecx
push ebx
push edx
call fcn.00471030
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x471456
mov eax, dword [esi]
push eax
call fcn.0046ef60
add esp, 4
mov dword [esi + 4], 0xffffffff
cmp byte [ebp - 0x339], 0
jne 0x471554
test edi, edi
jle 0x47147f
pop edi
pop esi
mov eax, 0x600
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048e770
mov esp, ebp
pop ebp
ret 0x10
lea eax, [edi + 0x6a]
neg eax
sbb eax, eax
pop edi
and eax, 0x4fff000
pop esi
add eax, 0x1000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048e770
mov esp, ebp
pop ebp
ret 0x10
or edi, 0xffffffff
cmp dword [esi + 4], edi
je 0x4714b6
mov ecx, dword [esi]
push ecx
call fcn.0046ef60
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], edi
mov edi, dword [ebp + 8]
cmp edi, dword [eax + 4]
jge 0x4713a5
cmp edi, dword [eax + 0x10]
jge 0x4714d5
push eax
call fcn.0046ecd0
add esp, 4
mov edx, dword [esi]
cmp dword [edx + 0x10], edi
jge 0x4714f2
lea esp, [esp]
mov eax, dword [esi]
push eax
call fcn.0046ed20
mov ecx, dword [esi]
add esp, 4
cmp dword [ecx + 0x10], edi
jl 0x4714e0
lea edx, [ebp - 0x338]
push edx
push edi
mov ecx, esi
call fcn.0046f190
test byte [ebp - 0x230], 0x10
je 0x471569
cmp dword [ebp + 0x14], 1
je 0x471554
mov al, byte [ebx]
cmp al, 0x2f
je 0x471524
cmp al, 0x5c
je 0x471524
test al, al
je 0x471544
cmp byte [ebx + 1], 0x3a
jne 0x471544
push ebx
push 0
call fcn.0046f730
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048e770
mov esp, ebp
pop ebp
ret 0x10
push ebx
add esi, 0x140
push esi
call fcn.0046f730
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048e770
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp + 0x14], 1
je 0x471608
mov al, byte [ebx]
mov edi, ebx
mov ecx, ebx
test al, al
je 0x471593
lea ecx, [ecx]
cmp al, 0x2f
je 0x471588
cmp al, 0x5c
jne 0x47158b
lea edi, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x471580
lea edx, [ebp - 0x108]
mov eax, ebx
sub edx, ebx
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4715a0
cmp edi, ebx
jne 0x471625
mov byte [ebp - 0x108], cl
push edi
lea ecx, [ebp - 0x108]
push ecx
lea ebx, [esi + 0x140]
push ebx
lea edx, [ebp - 0x20c]
push str._s_s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push eax
push ebx
call fcn.0046f730
add esp, 0x1c
mov ecx, dword [ebp - 0x230]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x471684
pop edi
pop esi
mov eax, 0x200
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048e770
mov esp, ebp
pop ebp
ret 0x10
mov eax, edi
sub eax, ebx
mov byte [ebp + eax - 0x108], 0
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x471654
cmp al, 0x5c
je 0x471654
test al, al
je 0x4715b4
cmp byte [ebp - 0x107], 0x3a
jne 0x4715b4
push edi
lea ecx, [ebp - 0x108]
push ecx
lea edx, [ebp - 0x20c]
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push eax
push 0
call fcn.0046f730
add esp, 0x18
jmp 0x4715e5
mov eax, dword [esi + 0x138]
mov ecx, dword [esi]
push eax
push ecx
call fcn.00470ea0
add esp, 8
cmp dword [esi + 0x13c], 0
jne 0x4716b2
push 0x4000
call sub.mfc100.dll_Ordinal_265
add esp, 4
mov dword [esi + 0x13c], eax
mov dword [ebp - 0x340], 0
lea esp, [esp]
mov eax, dword [esi + 0x13c]
mov ecx, dword [esi]
lea edx, [ebp - 0x339]
push edx
push 0x4000
push eax
push ecx
call fcn.00471030
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x471720
test edi, edi
js 0x471714
jle 0x471707
mov eax, dword [esi + 0x13c]
push 0
lea edx, [ebp - 0x344]
push edx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x47172c
cmp byte [ebp - 0x339], 0
jne 0x471738
test edi, edi
jne 0x4716c0
mov dword [ebp - 0x340], 0x5000000
jmp 0x471754
mov dword [ebp - 0x340], 0x1000
jmp 0x471754
mov dword [ebp - 0x340], 0x400
jmp 0x471754
lea ecx, [ebp - 0x21c]
push ecx
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 0x224]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x471761
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi]
push ecx
call fcn.0046ef60
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x340]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0048e770
mov esp, ebp
pop ebp
ret 0x10