Function at 0x405d8f
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x65c
mov eax, dword [0x429008]
xor eax, esp
mov dword [esp + 0x658], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ecx
push edi
mov dword [esp + 0x24c], esi
cmp dword [esi + 4], 0xffffffff
je 0x405dc5
mov ecx, dword [esi]
call fcn.004055a0
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
mov edi, dword [ebp + 8]
cmp edi, dword [eax + 4]
jl 0x405def
mov eax, 0x10000
mov ecx, dword [esp + 0x664]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040a35c
mov esp, ebp
pop ebp
ret 0x10
cmp dword [eax + 0x10], edi
jle 0x405e09
mov ecx, eax
call fcn.00404fdd
jmp 0x405e04
mov ecx, dword [esi]
call fcn.00405014
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x405dfd
lea eax, [esp + 0x18]
mov ecx, esi
push eax
push edi
call fcn.00405707
test byte [esp + 0x224], 0x10
movzx eax, word [ebx]
je 0x405e50
cmp eax, 0x2f
je 0x405e43
cmp eax, 0x5c
je 0x405e43
test ax, ax
je 0x405e3b
cmp word [ebx + 2], 0x3a
je 0x405e43
lea ecx, [esi + 0x244]
jmp 0x405e45
xor ecx, ecx
mov edx, ebx
call fcn.00405c8c
xor eax, eax
jmp 0x405dd8
mov dword [esp + 0x14], ebx
mov edx, ebx
push 0x5c
pop edi
test ax, ax
je 0x405e88
push 0x2f
mov ecx, eax
pop esi
cmp cx, si
je 0x405e6d
cmp cx, di
jne 0x405e74
lea ecx, [edx + 2]
mov dword [esp + 0x14], ecx
add edx, 2
movzx eax, word [edx]
mov ecx, eax
test ax, ax
jne 0x405e63
mov esi, dword [esp + 0x24c]
push ebx
lea eax, [esp + 0x254]
push 0x104
push eax
call fcn.0040e16b
mov ecx, dword [esp + 0x20]
add esp, 0xc
xor edi, edi
cmp ecx, ebx
jne 0x405eb4
xor eax, eax
mov word [esp + 0x250], ax
jmp 0x405ef8
mov eax, ecx
sub eax, ebx
and eax, 0xfffffffe
cmp eax, 0x208
jae 0x406045
xor edx, edx
mov word [esp + eax + 0x250], dx
mov ax, word [esp + 0x250]
push 0x2f
pop edx
cmp ax, dx
je 0x405f20
push 0x5c
pop edx
cmp ax, dx
je 0x405f20
test ax, ax
je 0x405ef8
cmp word [esp + 0x252], 0x3a
je 0x405f20
push ecx
lea eax, [esp + 0x254]
push eax
lea ebx, [esi + 0x244]
push ebx
lea eax, [esp + 0x464]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x405f41
push ecx
lea eax, [esp + 0x254]
push eax
lea eax, [esp + 0x460]
push 0x425b58
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov ebx, edi
lea edx, [esp + 0x250]
mov ecx, ebx
call fcn.00405c8c
push edi
push dword [esp + 0x228]
lea eax, [esp + 0x460]
push 2
push edi
push edi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x405f81
mov eax, 0x200
jmp 0x405dd8
mov edx, dword [esi + 0x23c]
mov ecx, dword [esi]
call fcn.004051f8
cmp dword [esi + 0x240], edi
jne 0x405fa7
push 0x4000
call fcn.0040a390
pop ecx
mov dword [esi + 0x240], eax
mov edx, dword [esi + 0x240]
lea eax, [esp + 0x13]
mov ecx, dword [esi]
push eax
push 0x4000
call fcn.0040534c
mov ebx, eax
pop ecx
pop ecx
cmp ebx, 0xffffff96
je 0x406028
test ebx, ebx
js 0x405ff6
jle 0x405feb
push edi
lea eax, [esp + 0x250]
push eax
push ebx
push dword [esi + 0x240]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405ffd
cmp byte [esp + 0x13], 0
jne 0x406004
test ebx, ebx
jne 0x405fa7
mov edi, 0x5000000
jmp 0x40602d
mov edi, 0x400
jmp 0x40602d
lea eax, [esp + 0x238]
push eax
lea eax, [esp + 0x22c]
push eax
lea eax, [esp + 0x238]
push eax
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x40602d
mov edi, 0x1000
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi]
call fcn.004055a0
mov eax, edi
jmp 0x405dd8
call fcn.0040a4bf
int3