Function at 0x404c09
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x358
mov eax, dword [0x46c018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, edx
cmp dword [ebx + 4], 0xffffffff
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x350], ebx
mov dword [ebp - 0x354], eax
je 0x404c40
push dword [ebx]
call fcn.0040448f
pop ecx
mov esi, dword [ebx]
or dword [ebx + 4], 0xffffffff
cmp edi, dword [esi + 4]
jl 0x404c55
mov eax, 0x10000
jmp 0x404eac
cmp edi, dword [esi + 0x10]
jge 0x404c68
call fcn.00403edd
jmp 0x404c68
mov esi, dword [ebx]
call fcn.00403f12
mov eax, dword [ebx]
cmp dword [eax + 0x10], edi
jl 0x404c61
push edi
lea edi, [ebp - 0x348]
mov ecx, ebx
call fcn.0040464a
test byte [ebp - 0x240], 0x10
je 0x404cba
mov ecx, dword [ebp - 0x354]
mov al, byte [ecx]
cmp al, 0x2f
je 0x404ca0
cmp al, 0x5c
je 0x404ca0
test al, al
je 0x404ca5
cmp byte [ecx + 1], 0x3a
jne 0x404ca5
push ecx
push 0
jmp 0x404cad
push ecx
add ebx, 0x140
push ebx
call fcn.00404b2d
pop ecx
xor eax, eax
jmp 0x404eab
mov esi, dword [ebp - 0x354]
mov al, byte [esi]
mov edi, esi
mov ecx, esi
jmp 0x404cd6
cmp al, 0x2f
je 0x404cd0
cmp al, 0x5c
jne 0x404cd3
lea edi, [ecx + 1]
inc ecx
mov al, byte [ecx]
test al, al
jne 0x404cc8
lea eax, [ebp - 0x110]
push esi
push eax
call dword [sym.imp.MSVCR100.dll_strcpy]
pop ecx
pop ecx
cmp edi, esi
jne 0x404d5c
mov byte [ebp - 0x110], 0
push edi
lea eax, [ebp - 0x110]
push eax
lea esi, [ebx + 0x140]
push esi
lea eax, [ebp - 0x218]
push 0x45e248
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [ebp - 0x110]
push eax
push esi
call fcn.00404b2d
pop ecx
pop ecx
xor eax, eax
push eax
push dword [ebp - 0x240]
push 2
push eax
push eax
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x354], eax
cmp eax, 0xffffffff
jne 0x404dc4
mov eax, 0x200
jmp 0x404eac
mov eax, edi
sub eax, esi
mov byte [ebp + eax - 0x110], 0
cmp byte [ebp - 0x110], 0x2f
je 0x404d94
cmp byte [ebp - 0x110], 0x5c
je 0x404d94
cmp byte [ebp - 0x110], 0
je 0x404cf5
cmp byte [ebp - 0x10f], 0x3a
jne 0x404cf5
push edi
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x218]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x110]
push eax
push 0
call fcn.00404b2d
add esp, 0x18
jmp 0x404d28
push dword [ebx + 0x138]
mov ebx, dword [ebx]
call fcn.00404126
mov esi, dword [ebp - 0x350]
cmp dword [esi + 0x13c], 0
pop ecx
mov edi, 0x4000
jne 0x404df4
push edi
call dword [sym.imp.mfc100.dll_Ordinal_265]
pop ecx
mov dword [esi + 0x13c], eax
and dword [ebp - 0x350], 0
lea eax, [ebp - 0x349]
push eax
push dword [esi + 0x13c]
mov eax, dword [esi]
mov ecx, edi
call fcn.0040427b
mov ebx, eax
pop ecx
pop ecx
cmp ebx, 0xffffff96
je 0x404e59
test ebx, ebx
js 0x404e4d
jle 0x404e40
push 0
lea eax, [ebp - 0x358]
push eax
push ebx
push dword [esi + 0x13c]
push dword [ebp - 0x354]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404e65
cmp byte [ebp - 0x349], 0
jne 0x404e71
test ebx, ebx
jne 0x404dfb
mov dword [ebp - 0x350], 0x5000000
jmp 0x404e92
mov dword [ebp - 0x350], 0x1000
jmp 0x404e92
mov dword [ebp - 0x350], 0x400
jmp 0x404e92
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x234]
push eax
push dword [ebp - 0x354]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push dword [ebp - 0x354]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.0040448f
mov eax, dword [ebp - 0x350]
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405956
leave
ret 4