Function at 0x40a59e
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x130
mov eax, dword [0x5107c0]
xor eax, esp
mov dword [esp + 0x12c], eax
push ebx
mov ebx, ecx
xor ecx, ecx
inc ecx
push edi
mov dword [esp + 0xc], ecx
cmp byte [ebx + 0x314], 0
jne 0x40a5ef
cmp byte [ebx + 0x313], 0
je 0x40a5ef
cmp byte [ebx + 0x312], 0
je 0x40a5ef
mov eax, dword [ebx + 0x33c]
sub eax, dword [ebx + 0x338]
sar eax, 3
mov byte [esp + 0xb], cl
test eax, eax
jne 0x40a5f4
mov byte [esp + 0xb], 0
and dword [esp + 0x10], 0
xor edi, edi
mov ecx, ebx
mov dword [esp + 0x18], edi
call fcn.0040abee
test al, al
je 0x40a8b8
cmp byte [esp + 0xb], 0
je 0x40a634
mov eax, dword [ebx + 0x338]
mov edi, dword [eax]
lea eax, [esp + 0x30]
push eax
lea eax, [ebx + 0x326]
mov dword [esp + 0x1c], edi
push eax
call fcn.0046c22c
pop ecx
pop ecx
push esi
xor eax, eax
lea esi, [ebx + 0x102]
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
jne 0x40a694
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xe2bee6ed
mov edx, 0xc66fe23a
mov ecx, 0x2f266c42
call fcn.004013c5
pop ecx
push eax
lea eax, [ebx + 0x34c]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov byte [esp + 0x10], 0
jmp 0x40a8ac
mov eax, dword [ebx + 0x554]
xor esi, esi
push ebp
cmp byte [ebx + 0x310], 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], esi
jne 0x40a89c
push 0x20
pop ebp
cmp eax, ebp
cmovbe ebp, eax
mov dword [esp + 0x34], ebp
test ebp, ebp
je 0x40a8a1
push dword [ebx + 0x570]
mov ecx, dword [ebx + 0x56c]
push ebp
push esi
call fcn.00441211
cmp eax, ebp
jne 0x40a86c
cmp byte [esp + 0x13], 0
je 0x40a7a6
cmp esi, edi
jb 0x40a7a6
mov eax, dword [ebx + 0x570]
lea ecx, [esi + ebp]
mov dword [esp + 0x30], ecx
mov edi, esi
cmp esi, ecx
jae 0x40a7a6
mov edx, dword [esp + 0x18]
lea esi, [eax + 0x10]
mov ebp, ecx
mov eax, dword [ebx + 0x33c]
mov ecx, dword [ebx + 0x338]
sub eax, ecx
sar eax, 3
cmp edx, eax
jae 0x40a78f
lea ecx, [ecx + edx*8]
cmp dword [ecx], edi
ja 0x40a78f
cmp dword [ecx + 4], edi
ja 0x40a743
inc edx
add ecx, 8
mov dword [esp + 0x18], edx
cmp edx, eax
jb 0x40a72c
jmp 0x40a78f
lea eax, [esp + 0x38]
mov dword [esp + 0x12c], 0xddf8a00b
push eax
lea eax, [esp + 0x130]
mov dword [esp + 0x134], 0xb31fa6fe
push eax
push 0x7f0
push esi
push esi
mov dword [esp + 0x148], 0x569fdfd8
mov dword [esp + 0x14c], 0x780f056a
call fcn.0046c3d7
mov edx, dword [esp + 0x2c]
add esp, 0x14
add esi, 0x800
inc edi
cmp edi, ebp
jb 0x40a714
mov ebp, dword [esp + 0x34]
mov esi, dword [esp + 0x1c]
test esi, esi
jne 0x40a7fa
cmp byte [ebx + 0x312], 0
je 0x40a7fa
cmp byte [ebx + 0x315], 0
je 0x40a7fa
mov eax, dword [ebx + 0x570]
lea esi, [ebx + 0x316]
mov byte [eax], 0x41
mov eax, dword [ebx + 0x570]
mov byte [eax + 1], 0x41
mov eax, dword [ebx + 0x570]
mov byte [eax + 2], 0x43
mov eax, dword [ebx + 0x570]
mov byte [eax + 3], 0x53
mov edi, dword [ebx + 0x570]
add edi, 0x10
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x1c]
push 0
lea eax, [esp + 0x28]
mov edi, ebp
push eax
shl edi, 0xb
push edi
push dword [ebx + 0x570]
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a838
cmp edi, dword [esp + 0x24]
jne 0x40a838
mov eax, dword [esp + 0x28]
add esi, ebp
mov edi, dword [esp + 0x20]
sub eax, ebp
add dword [ebx + 0x558], ebp
jmp 0x40a69d
push dword [esp + 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x3da2af8b
mov edx, 0x1973ab5a
mov ecx, 0xf03a25be
call fcn.004013c5
pop ecx
push eax
lea eax, [ebx + 0x34c]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x40a89c
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x8d1a74aa
mov edx, 0xa9cb7047
mov ecx, 0x4082fee7
call fcn.004013c5
pop ecx
push eax
lea eax, [ebx + 0x34c]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
mov byte [esp + 0x14], 0
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
mov ecx, ebx
call fcn.0040ac32
mov al, byte [esp + 0x10]
pop esi
mov ecx, dword [esp + 0x134]
pop edi
pop ebx
xor ecx, esp
call fcn.004b35e5
add esp, 0x130
ret