Function at 0x4f51b2
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50ab79
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x54c494]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xc4], ecx
and dword [ebp - 0x40], 0
mov eax, dword [ebp + 0x14]
and dword [eax], 0
cmp dword [ebp + 0xc], 0
jbe 0x4f53bf
mov eax, dword [ebp - 0xc4]
movzx eax, byte [eax + 0x1c]
test eax, eax
jne 0x4f5290
mov eax, dword [ebp - 0xc4]
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x44], eax
push 0
push dword [ebp + 0x14]
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4f528b
push 8
call fcn.00487d37
pop ecx
mov dword [ebp - 0x34], eax
and dword [ebp - 4], 0
cmp dword [ebp - 0x34], 0
je 0x4f525b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [ebp - 0x34]
call fcn.004d3197
mov dword [ebp - 0xc8], eax
jmp 0x4f5262
and dword [ebp - 0xc8], 0
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 0x30], eax
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x30]
mov ecx, dword [ebp + 8]
call fcn.004dc26e
mov eax, dword [ebp - 0x40]
or eax, 1
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
jmp 0x4f53d8
jmp 0x4f53bf
and dword [ebp - 0x18], 0
and dword [ebp - 0x14], 0
mov dword [ebp - 4], 1
mov eax, dword [ebp + 0x14]
and dword [eax], 0
push dword [ebp + 0x14]
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
mov eax, dword [ebp - 0xc4]
push dword [eax + 0x2c]
push dword [eax + 0x28]
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0xc4]
call fcn.004f5779
mov byte [ebp - 4], 2
xor eax, eax
cmp dword [ebp - 0x18], 0
sete al
movzx eax, al
test eax, eax
jne 0x4f5331
and dword [ebp - 0x2c], 0
and dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x48]
call fcn.004f8a04
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0x68], eax
mov byte [ebp - 4], 3
push dword [ebp - 0x68]
lea ecx, [ebp - 0x20]
call fcn.004d50a3
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x3c]
call fcn.004f6633
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
xor eax, eax
cmp dword [ebp - 0x20], 0
sete al
movzx eax, al
test eax, eax
je 0x4f5362
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
xor ecx, ecx
mov edx, dword [ebp - 0xc4]
add eax, dword [edx + 0x28]
mov edx, dword [edx + 0x2c]
adc edx, ecx
mov ecx, dword [ebp - 0xc4]
mov dword [ecx + 0x28], eax
mov dword [ecx + 0x2c], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 4], ecx
mov eax, dword [ebp + 8]
cmp dword [eax + 4], 0
je 0x4f5399
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x88]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 0x88]
mov dword [ecx], eax
mov eax, dword [ebp - 0x40]
or eax, 1
mov dword [ebp - 0x40], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
call fcn.004f6633
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.004f6633
mov eax, dword [ebp + 8]
jmp 0x4f53d8
mov eax, dword [ebp + 8]
and dword [eax], 0
mov eax, dword [ebp + 8]
and dword [eax + 4], 0
mov eax, dword [ebp - 0x40]
or eax, 1
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
leave
ret 0x10