Function at 0x405cd0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x428060
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x433018]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], eax
call fcn.00406390
mov eax, dword [ebx + 0x10]
lea esi, [ebx + 4]
add eax, 8
cmp eax, dword [esi + 0x10]
jb 0x405d1d
call fcn.0040cac0
mov eax, dword [esi + 0xc]
lea ecx, [eax + 8]
mov dword [esi + 0xc], ecx
test eax, eax
je 0x405d34
mov dword [eax], 0
mov byte [eax + 4], 0
mov eax, dword [ebx]
mov esi, dword [eax]
push 0x7b
call fcn.004079f0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov eax, dword [eax]
add esp, 4
mov dword [ebp - 0x14], eax
lea ecx, [ecx]
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx + 4]
je 0x405db9
cmp dword [eax + 0x1c], 8
lea edi, [eax + 8]
jb 0x405d63
mov edi, dword [edi]
mov esi, edi
cmp word [esi], 0
je 0x405d70
add esi, 2
jmp 0x405d65
call fcn.00406390
sub esi, edi
sar esi, 1
push esi
push edi
push ebx
call fcn.004064b0
mov eax, dword [ebp - 0x14]
add eax, 0x24
push eax
push ebx
call fcn.00406730
mov edx, dword [ebp - 0x14]
add esp, 8
add dword [ebp - 0x18], eax
mov eax, dword [edx]
mov dword [ebp - 0x14], eax
jmp 0x405d50
add dword [ebx + 0x10], 0xfffffff8
mov eax, dword [ebx + 0x10]
cmp dword [eax], 0
je 0x405e52
mov ecx, dword [ebx]
mov esi, dword [ecx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x405df8
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x405df8
mov edx, dword [esi]
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
jmp 0x405dfe
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0xa
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x405e2a
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x405e2a
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0
inc dword [esi + 0xc]
mov eax, dword [ebx + 0x10]
sub eax, dword [ebx + 0xc]
movzx edx, word [ebx + 0x20]
mov ecx, dword [ebx]
shr eax, 3
imul eax, dword [ebx + 0x24]
push edx
push ecx
call fcn.00407a60
add esp, 8
jmp 0x405e58
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
mov edx, dword [ebx]
mov esi, dword [edx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x405e7f
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x405e7f
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0x7d
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x405eab
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x405eab
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0
inc dword [esi + 0xc]
mov edx, dword [ebx + 0x10]
cmp edx, dword [ebx + 0xc]
jne 0x405ede
mov eax, dword [ebx]
mov esi, dword [eax]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x405ede
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret