Function at 0x408cb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x434c
call fcn.00465840
mov eax, dword [0x4926cc]
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 edi, ecx
mov dword [ebp - 0x4214], ebx
cmp eax, 3
je 0x409011
cmp eax, 2
je 0x408d03
cmp eax, 1
je 0x408d03
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00452ca6
mov esp, ebp
pop ebp
ret 0x10
cmp dword [edi + 4], 0xffffffff
je 0x408d10
mov ecx, dword [edi]
call fcn.00408460
mov ecx, dword [edi]
mov esi, dword [ebp + 8]
mov dword [edi + 4], 0xffffffff
cmp esi, dword [ecx + 4]
jge 0x408ceb
cmp esi, dword [ecx + 0x10]
jge 0x408d2b
call fcn.00407c70
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jge 0x408d8d
mov ebx, esi
mov esi, dword [edi]
test esi, esi
je 0x408d7d
cmp dword [esi + 0x18], 0
je 0x408d7d
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x408d7d
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov eax, dword [esi + 0x48]
add eax, 0x2e
sub esp, 0x10
add eax, ecx
add dword [esi + 0x14], eax
push 0
lea eax, [esi + 0x78]
mov dword [esi + 0x10], edx
push 0
push eax
lea edx, [esi + 0x28]
mov ecx, esi
call fcn.00407880
add esp, 0x1c
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jl 0x408d34
mov ebx, dword [ebp - 0x4214]
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x4348]
push eax
push 0xffffffffffffffff
mov ecx, edi
call fcn.00408610
cmp esi, 0xffffffff
jl 0x408db1
lea eax, [ebp - 0x4348]
push eax
push esi
mov ecx, edi
call fcn.00408610
test byte [ebp - 0x4240], 0x10
je 0x408e1b
cmp dword [ebp + 0x14], 1
je 0x408e06
push 0x206
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.0045a8b0
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x103
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x4344]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ecx, [edi + 0x138]
lea edx, [ebp - 0x210]
call fcn.00408bb0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00452ca6
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp + 0x14], 1
je 0x408f25
movzx eax, word [ebx]
mov edx, ebx
mov ecx, ebx
test ax, ax
je 0x408f09
cmp ax, 0x2f
je 0x408e41
cmp ax, 0x5c
jne 0x408e44
lea edx, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x408e35
cmp edx, ebx
je 0x408f09
lea esi, [ebp - 0x210]
mov ecx, ebx
sub esi, ebx
movzx eax, word [ecx]
mov word [esi + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x408e62
sub edx, ebx
sar edx, 1
lea edx, [edx*2 - 2]
cmp edx, 0x208
jae 0x40910d
xor eax, eax
mov word [ebp + edx - 0x210], ax
mov ax, word [ebp - 0x210]
cmp ax, 0x2f
je 0x408eb6
cmp ax, 0x5c
je 0x408eb6
cmp word [ebp - 0x20e], 0x3a
mov byte [ebp - 0x4349], 0
jne 0x408ebd
mov byte [ebp - 0x4349], 1
lea eax, [ebp - 0x210]
push 0x4814f8
push eax
call fcn.00455005
mov esi, eax
lea eax, [ebp - 0x210]
push 0x481500
push eax
call fcn.00455005
add esp, 0x10
test eax, eax
setne cl
test esi, esi
setne al
or cl, al
or cl, byte [ebp - 0x4349]
jne 0x408f09
lea ecx, [edi + 0x138]
lea edx, [ebp - 0x210]
call fcn.00408bb0
push 0
push dword [ebp - 0x4240]
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x408f42
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00452ca6
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [edi]
call fcn.004081a0
mov ecx, dword [edi]
push 0x4000
lea edx, [ebp - 0x4210]
mov byte [ebp - 0x4349], 0
call fcn.004082c0
add esp, 4
test eax, eax
js 0x408fa2
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x408fa9
push 0
lea ecx, [ebp - 0x4214]
push ecx
push eax
lea eax, [ebp - 0x4210]
push eax
push ebx
call esi
test eax, eax
je 0x408fa2
mov ecx, dword [edi]
push 0x4000
lea edx, [ebp - 0x4210]
call fcn.004082c0
add esp, 4
test eax, eax
jns 0x408f6f
mov byte [ebp - 0x4349], 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x408fda
cmp byte [ebp - 0x4349], 0
jne 0x408fda
lea eax, [ebp - 0x422c]
push eax
lea eax, [ebp - 0x423c]
push eax
lea eax, [ebp - 0x4234]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x408fe7
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi]
call fcn.00408460
xor eax, eax
cmp byte [ebp - 0x4349], al
mov ecx, 0x400
cmovne eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00452ca6
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [edi + 4]
mov esi, dword [ebp + 8]
cmp esi, eax
je 0x4090b3
cmp eax, 0xffffffff
je 0x40902b
mov ecx, dword [edi]
call fcn.00408460
mov ecx, dword [edi]
mov dword [edi + 4], 0xffffffff
cmp esi, dword [ecx + 4]
jge 0x408ceb
cmp esi, dword [ecx + 0x10]
jge 0x409047
call fcn.00407c70
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jge 0x4090a9
mov ebx, esi
mov esi, dword [edi]
test esi, esi
je 0x409099
cmp dword [esi + 0x18], 0
je 0x409099
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x409099
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov eax, dword [esi + 0x48]
add eax, 0x2e
sub esp, 0x10
add eax, ecx
add dword [esi + 0x14], eax
push 0
lea eax, [esi + 0x78]
mov dword [esi + 0x10], edx
push 0
push eax
lea edx, [esi + 0x28]
mov ecx, esi
call fcn.00407880
add esp, 0x1c
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jl 0x409050
mov ebx, dword [ebp - 0x4214]
mov esi, dword [ebp + 8]
mov ecx, dword [edi]
call fcn.004081a0
mov dword [edi + 4], esi
push dword [ebp + 0x10]
mov ecx, dword [edi]
mov edx, ebx
call fcn.004082c0
mov esi, eax
add esp, 4
test esi, esi
jle 0x4090e0
mov eax, 0x600
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00452ca6
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [edi]
call fcn.00408460
mov ecx, dword [ebp - 4]
neg esi
sbb esi, esi
and esi, 0x5000000
mov dword [edi + 4], 0xffffffff
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00452ca6
mov esp, ebp
pop ebp
ret 0x10
call fcn.004553d2
int3