Function at 0x480b92
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
mov eax, dword [0x51a448]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 0xc]
cmp eax, 3
je 0x480bcc
cmp eax, 2
je 0x480bc3
cmp eax, 1
jne 0x480c89
cmp eax, 3
jne 0x480c6e
mov ebx, dword [ebp + 8]
cmp ebx, dword [esi + 4]
je 0x480c18
cmp dword [esi + 4], 0xffffffff
je 0x480be1
mov ecx, dword [esi]
call fcn.00480234
mov ecx, dword [esi]
or dword [esi + 4], 0xffffffff
cmp ebx, dword [ecx + 4]
jge 0x480c89
cmp dword [ecx + 0x10], ebx
jle 0x480c08
call fcn.0047fb4d
jmp 0x480c03
mov ecx, dword [esi]
call fcn.0047fb84
mov ecx, dword [esi]
cmp dword [ecx + 0x10], ebx
jl 0x480bfc
mov edx, dword [esi + 0x138]
call fcn.0047fe11
mov dword [esi + 4], ebx
mov ecx, dword [esi]
lea eax, [ebp - 0x349]
push eax
push dword [ebp + 0x10]
mov edx, edi
call fcn.0047ff65
mov edi, eax
pop ecx
pop ecx
test edi, edi
jg 0x480c3e
mov ecx, dword [esi]
call fcn.00480234
or dword [esi + 4], 0xffffffff
cmp byte [ebp - 0x349], 0
jne 0x480ee5
test edi, edi
jle 0x480c59
mov eax, 0x600
jmp 0x480ee7
cmp edi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
jmp 0x480ee7
cmp dword [esi + 4], 0xffffffff
je 0x480c7b
mov ecx, dword [esi]
call fcn.00480234
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, dword [eax + 4]
jl 0x480c93
mov eax, 0x10000
jmp 0x480ee7
cmp dword [eax + 0x10], ebx
jle 0x480cad
mov ecx, eax
call fcn.0047fb4d
jmp 0x480ca8
mov ecx, dword [esi]
call fcn.0047fb84
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x480ca1
lea eax, [ebp - 0x348]
mov ecx, esi
push eax
push ebx
call fcn.00480503
lea eax, [ebp - 0x344]
push eax
call fcn.004c8d20
test byte [ebp - 0x240], 0x10
pop ecx
jne 0x480eba
mov al, byte [ebp + eax - 0x345]
cmp al, 0x2f
je 0x480eba
cmp al, 0x5c
je 0x480eba
xor ebx, ebx
cmp dword [ebp + 0x14], 1
je 0x480de4
mov eax, edi
mov ecx, edi
mov dword [ebp - 0x350], eax
mov al, byte [edi]
jmp 0x480d1d
cmp al, 0x2f
je 0x480d11
cmp al, 0x5c
jne 0x480d1a
lea eax, [ecx + 1]
mov dword [ebp - 0x350], eax
inc ecx
mov al, byte [ecx]
test al, al
jne 0x480d09
lea eax, [ebp - 0x110]
push edi
push eax
call fcn.004c99d0
pop ecx
pop ecx
mov ecx, dword [ebp - 0x350]
cmp ecx, edi
jne 0x480d42
mov byte [ebp - 0x110], bl
jmp 0x480d73
mov eax, ecx
sub eax, edi
cmp eax, 0x104
jae 0x480ef8
mov byte [ebp + eax - 0x110], bl
mov al, byte [ebp - 0x110]
cmp al, 0x2f
je 0x480d99
cmp al, 0x5c
je 0x480d99
test al, al
je 0x480d73
cmp byte [ebp - 0x10f], 0x3a
je 0x480d99
push ecx
lea eax, [ebp - 0x110]
push eax
lea edi, [esi + 0x140]
push edi
lea eax, [ebp - 0x218]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
jmp 0x480db8
push ecx
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x218]
push 0x507908
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov edi, ebx
lea edx, [ebp - 0x110]
mov ecx, edi
call fcn.00480aad
push ebx
push dword [ebp - 0x240]
lea eax, [ebp - 0x218]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x480df3
mov eax, 0x200
jmp 0x480ee7
mov edx, dword [esi + 0x138]
mov ecx, dword [esi]
call fcn.0047fe11
cmp dword [esi + 0x13c], ebx
jne 0x480e19
push 0x4000
call fcn.0049da2e
pop ecx
mov dword [esi + 0x13c], eax
mov edx, dword [esi + 0x13c]
lea eax, [ebp - 0x349]
mov ecx, dword [esi]
push eax
push 0x4000
call fcn.0047ff65
mov dword [ebp - 0x350], eax
pop ecx
pop ecx
cmp eax, 0xffffff96
je 0x480e9d
test eax, eax
js 0x480e71
jle 0x480e65
push ebx
lea ecx, [ebp - 0x354]
push ecx
push eax
push dword [esi + 0x13c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x480e78
mov eax, dword [ebp - 0x350]
cmp byte [ebp - 0x349], bl
jne 0x480e7f
test eax, eax
jne 0x480e19
mov ebx, 0x5000000
jmp 0x480ea2
mov ebx, 0x400
jmp 0x480ea2
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x234]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x480ea2
mov ebx, 0x1000
cmp dword [ebp + 0x14], 1
je 0x480eaf
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi]
call fcn.00480234
mov eax, ebx
jmp 0x480ee7
cmp dword [ebp + 0x14], 1
je 0x480ee5
mov al, byte [edi]
cmp al, 0x2f
je 0x480edc
cmp al, 0x5c
je 0x480edc
test al, al
je 0x480ed4
cmp byte [edi + 1], 0x3a
je 0x480edc
lea ecx, [esi + 0x140]
jmp 0x480ede
xor ecx, ecx
mov edx, edi
call fcn.00480aad
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049d307
leave
ret 0x10
call fcn.0049d83b
int3