Function at 0x405ab0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x634
mov eax, dword [0x5a61b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
cmp word [ebx + 0x10], 0
lea eax, [ebx + 0x10]
push esi
push edi
je 0x405d43
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x624], esi
cmp esi, 0xffffffff
je 0x405d43
mov al, byte [ebx + 0x21c]
mov dword [ebp - 0x62c], 0
cmp al, 1
jne 0x405b26
push 0
lea eax, [ebp - 0x62c]
push eax
push 2
push 0x587ec0
jmp 0x405b3a
cmp al, 2
jne 0x405b41
push 0
lea eax, [ebp - 0x62c]
push eax
push 3
push 0x587bb0
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor edi, edi
mov dword [ebp - 0x628], edi
cmp dword [ebx + 0xc], edi
jle 0x405d24
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov edx, dword [ebx + 4]
test edx, edx
je 0x405b84
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x405b84
test edi, edi
js 0x405b84
cmp edi, ecx
jge 0x405b84
push eax
imul eax, edi
add eax, edx
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.0052f8d0
jmp 0x405b93
push eax
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.0052cef0
mov ecx, 0x82
lea esi, [ebp - 0x210]
lea edi, [ebp - 0x418]
add esp, 0xc
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x624]
xor edi, edi
cmp word [ebp - 0x210], di
je 0x405be5
push 0x587ec4
push esi
mov ecx, ebx
call fcn.004059b0
lea eax, [ebp - 0x418]
mov ecx, ebx
push eax
push esi
call fcn.004059b0
push 0x587ec8
push esi
mov ecx, ebx
mov edi, eax
call fcn.004059b0
mov ecx, dword [ebp - 0x214]
test ecx, ecx
je 0x405c00
cmp word [ecx], 0
je 0x405c00
push ecx
push esi
mov ecx, ebx
call fcn.004059b0
mov edi, eax
test edi, edi
je 0x405c11
push 0x587ecc
push esi
mov ecx, ebx
call fcn.004059b0
mov edi, dword [ebp - 0x218]
xor esi, esi
mov dword [ebp - 0x630], esi
cmp dword [edi + 0xc], esi
jle 0x405d08
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov edx, dword [edi + 4]
test edx, edx
je 0x405c5a
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x405c5a
test esi, esi
js 0x405c5a
cmp esi, ecx
jge 0x405c5a
push eax
imul eax, esi
add eax, edx
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.0052f8d0
jmp 0x405c69
push eax
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.0052cef0
mov ecx, 0x82
lea esi, [ebp - 0x210]
lea edi, [ebp - 0x620]
add esp, 0xc
cmp word [ebp - 0x210], 0
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x624]
je 0x405cc6
lea eax, [ebp - 0x620]
mov ecx, ebx
push eax
push esi
call fcn.004059b0
push 0x587ed4
push esi
mov ecx, ebx
call fcn.004059b0
push dword [ebp - 0x420]
mov ecx, ebx
push esi
call fcn.004059b0
push 0x587ee0
push esi
mov ecx, ebx
call fcn.004059b0
mov eax, dword [ebp - 0x41c]
test eax, eax
je 0x405cdf
cmp word [eax], 0
je 0x405cdf
push eax
push esi
mov ecx, ebx
call fcn.004059b0
push 0x587ecc
push esi
mov ecx, ebx
call fcn.004059b0
mov esi, dword [ebp - 0x630]
mov edi, dword [ebp - 0x218]
inc esi
mov dword [ebp - 0x630], esi
cmp esi, dword [edi + 0xc]
jl 0x405c28
mov edi, dword [ebp - 0x628]
inc edi
mov dword [ebp - 0x628], edi
cmp edi, dword [ebx + 0xc]
jl 0x405b52
mov esi, dword [ebp - 0x624]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052ace1
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0052ace1
mov esp, ebp
pop ebp
ret 8