Function at 0x413196
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x130
mov eax, dword [0x518450]
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 0x4131e7
cmp byte [ebx + 0x313], 0
je 0x4131e7
cmp byte [ebx + 0x312], 0
je 0x4131e7
mov eax, dword [ebx + 0x33c]
sub eax, dword [ebx + 0x338]
sar eax, 3
mov byte [esp + 0xb], cl
test eax, eax
jne 0x4131ec
mov byte [esp + 0xb], 0
and dword [esp + 0x10], 0
xor edi, edi
mov ecx, ebx
mov dword [esp + 0x18], edi
call fcn.004137e6
test al, al
je 0x4134b0
cmp byte [esp + 0xb], 0
je 0x41322c
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.00473c35
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 0x41328c
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x568155f4
mov edx, 0x709d9f0
mov ecx, 0xa3601f35
call fcn.00401888
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 0x4134a4
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 0x413494
push 0x20
pop ebp
cmp eax, ebp
cmovbe ebp, eax
mov dword [esp + 0x34], ebp
test ebp, ebp
je 0x413499
push dword [ebx + 0x570]
mov ecx, dword [ebx + 0x56c]
push ebp
push esi
call fcn.004483df
cmp eax, ebp
jne 0x413464
cmp byte [esp + 0x13], 0
je 0x41339e
cmp esi, edi
jb 0x41339e
mov eax, dword [ebx + 0x570]
lea ecx, [esi + ebp]
mov dword [esp + 0x30], ecx
mov edi, esi
cmp esi, ecx
jae 0x41339e
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 0x413387
lea ecx, [ecx + edx*8]
cmp dword [ecx], edi
ja 0x413387
cmp dword [ecx + 4], edi
jae 0x41333b
inc edx
add ecx, 8
mov dword [esp + 0x18], edx
cmp edx, eax
jb 0x413324
jmp 0x413387
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.0047398e
mov edx, dword [esp + 0x2c]
add esp, 0x14
add esi, 0x800
inc edi
cmp edi, ebp
jb 0x41330c
mov ebp, dword [esp + 0x34]
mov esi, dword [esp + 0x1c]
test esi, esi
jne 0x4133f2
cmp byte [ebx + 0x312], 0
je 0x4133f2
cmp byte [ebx + 0x315], 0
je 0x4133f2
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 0x413430
cmp edi, dword [esp + 0x24]
jne 0x413430
mov eax, dword [esp + 0x28]
add esi, ebp
mov edi, dword [esp + 0x20]
sub eax, ebp
add dword [ebx + 0x558], ebp
jmp 0x413295
push dword [esp + 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xa92e38d4
mov edx, 0xf8a6b4d6
mov ecx, 0x5ccf728f
call fcn.00401888
pop ecx
push eax
lea eax, [ebx + 0x34c]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x413494
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x27f8759e
mov edx, 0x7670f9a0
mov ecx, 0xd2193fbd
call fcn.00401888
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.0041382a
mov al, byte [esp + 0x10]
pop esi
mov ecx, dword [esp + 0x134]
pop edi
pop ebx
xor ecx, esp
call fcn.004b9a6c
add esp, 0x130
ret