Function at 0x515e6c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffedc
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x516151
push dword fs:[eax]
mov dword fs:[eax], esp
xor edx, edx
push ebp
push 0x516114
push dword fs:[edx]
mov dword fs:[edx], esp
mov ebx, dword [ebp + 8]
jmp 0x515ead
add ebx, 2
movzx eax, word [ebx]
cmp ax, 0xd
je 0x515ebc
cmp ax, 0xa
jne 0x515eaa
mov word [ebx], 0
add ebx, 2
jmp 0x515ec9
add ebx, 2
movzx eax, word [ebx]
cmp ax, 0xd
je 0x515ec6
cmp ax, 0xa
je 0x515ec6
lea eax, [ebp - 0x24]
mov edx, ebx
call fcn.004089bc
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x1c]
call fcn.00409b68
mov esi, eax
lea eax, [ebp - 4]
call fcn.00407c28
push eax
lea eax, [ebp - 8]
call fcn.00407c28
push eax
lea eax, [ebp - 0xc]
call fcn.00407c28
push eax
lea ecx, [ebp - 0x18]
lea edx, [ebp - 0x14]
mov eax, esi
call fcn.00515d84
cmp dword [ebp - 0x14], 0
jne 0x515f3c
cmp dword [ebp - 0x18], 0
jne 0x515f3c
cmp dword [ebp - 4], 0
jne 0x515f3c
cmp dword [ebp - 8], 0
jne 0x515f3c
cmp dword [ebp - 0xc], 0
jne 0x515f3c
push 0
call sub.kernel32.dll_ExitThread_1
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_CreateFileW_1
mov ebx, eax
cmp ebx, 0xffffffff
je 0x51610a
push 0
lea eax, [ebp - 0x20]
push eax
push 2
mov eax, dword [0x595b04]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
mov eax, dword [ebp - 0x14]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x124]
call fcn.00409b4c
lea edx, [ebp - 0x124]
lea eax, [ebp - 0x10]
call fcn.00408adc
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x515fa2
sub eax, 4
mov eax, dword [eax]
push 0
lea edx, [ebp - 0x20]
push edx
add eax, eax
push eax
mov eax, dword [ebp - 0x10]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebp - 0x20]
push eax
push 4
push 0x5916c8
push ebx
call sub.kernel32.dll_WriteFile_1
mov eax, dword [ebp - 0x18]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x124]
call fcn.00409b4c
lea edx, [ebp - 0x124]
lea eax, [ebp - 0x10]
call fcn.00408adc
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x515ff4
sub eax, 4
mov eax, dword [eax]
push 0
lea edx, [ebp - 0x20]
push edx
add eax, eax
push eax
mov eax, dword [ebp - 0x10]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebp - 0x20]
push eax
push 4
push 0x5916c8
push ebx
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 4]
call fcn.0040895c
call fcn.00442bfc
add eax, eax
push eax
mov eax, dword [ebp - 4]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebp - 0x20]
push eax
push 4
push 0x5916c8
push ebx
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 8]
call fcn.0040895c
call fcn.00442bfc
add eax, eax
push eax
mov eax, dword [ebp - 8]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebp - 0x20]
push eax
push 4
push 0x5916c8
push ebx
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0xc]
call fcn.0040895c
call fcn.00442bfc
add eax, eax
push eax
mov eax, dword [ebp - 0xc]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebp - 0x20]
push eax
push 4
push 0x5916c8
push ebx
call sub.kernel32.dll_WriteFile_1
mov eax, esi
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x124]
call fcn.00409b4c
lea edx, [ebp - 0x124]
lea eax, [ebp - 0x10]
call fcn.00408adc
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x5160de
sub eax, 4
mov eax, dword [eax]
push 0
lea edx, [ebp - 0x20]
push edx
add eax, eax
push eax
mov eax, dword [ebp - 0x10]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebp - 0x20]
push eax
push 4
push 0x5916c8
push ebx
call sub.kernel32.dll_WriteFile_1
push ebx
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x516125
push 0
call sub.kernel32.dll_ExitThread_1
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x516158
lea eax, [ebp - 0x24]
call fcn.00407c28
lea eax, [ebp - 0x10]
mov edx, 4
call fcn.00407c88
ret