Function at 0x412dc4
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x130
mov eax, dword [0x517490]
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 0x412e15
cmp byte [ebx + 0x313], 0
je 0x412e15
cmp byte [ebx + 0x312], 0
je 0x412e15
mov eax, dword [ebx + 0x33c]
sub eax, dword [ebx + 0x338]
sar eax, 3
mov byte [esp + 0xb], cl
test eax, eax
jne 0x412e1a
mov byte [esp + 0xb], 0
and dword [esp + 0x10], 0
xor edi, edi
mov ecx, ebx
mov dword [esp + 0x18], edi
call fcn.00413414
test al, al
je 0x4130de
cmp byte [esp + 0xb], 0
je 0x412e5a
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.0047365a
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 0x412eba
push esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x83738242
mov edx, 0x1dc8d882
mov ecx, 0x8b38457d
call fcn.0040172a
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 0x4130d2
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 0x4130c2
push 0x20
pop ebp
cmp eax, ebp
cmovbe ebp, eax
mov dword [esp + 0x34], ebp
test ebp, ebp
je 0x4130c7
push dword [ebx + 0x570]
mov ecx, dword [ebx + 0x56c]
push ebp
push esi
call fcn.00447fdd
cmp eax, ebp
jne 0x413092
cmp byte [esp + 0x13], 0
je 0x412fcc
cmp esi, edi
jb 0x412fcc
mov eax, dword [ebx + 0x570]
lea ecx, [esi + ebp]
mov dword [esp + 0x30], ecx
mov edi, esi
cmp esi, ecx
jae 0x412fcc
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 0x412fb5
lea ecx, [ecx + edx*8]
cmp dword [ecx], edi
ja 0x412fb5
cmp dword [ecx + 4], edi
jae 0x412f69
inc edx
add ecx, 8
mov dword [esp + 0x18], edx
cmp edx, eax
jb 0x412f52
jmp 0x412fb5
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.004733b3
mov edx, dword [esp + 0x2c]
add esp, 0x14
add esi, 0x800
inc edi
cmp edi, ebp
jb 0x412f3a
mov ebp, dword [esp + 0x34]
mov esi, dword [esp + 0x1c]
test esi, esi
jne 0x413020
cmp byte [ebx + 0x312], 0
je 0x413020
cmp byte [ebx + 0x315], 0
je 0x413020
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 0x41305e
cmp edi, dword [esp + 0x24]
jne 0x41305e
mov eax, dword [esp + 0x28]
add esi, ebp
mov edi, dword [esp + 0x20]
sub eax, ebp
add dword [ebx + 0x558], ebp
jmp 0x412ec3
push dword [esp + 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xf4f44a47
mov edx, 0x6a4f1081
mov ecx, 0xfcbf8de2
call fcn.0040172a
pop ecx
push eax
lea eax, [ebx + 0x34c]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x4130c2
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x5f8bf5e2
mov edx, 0xc130af18
mov ecx, 0x57c0323f
call fcn.0040172a
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.00413458
mov al, byte [esp + 0x10]
pop esi
mov ecx, dword [esp + 0x134]
pop edi
pop ebx
xor ecx, esp
call fcn.004b94b6
add esp, 0x130
ret