Function at 0x52b314
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
xor ebx, ebx
mov dword [ebp - 0x14], ebx
test dl, dl
je 0x52b32c
add esp, 0xfffffff0
call fcn.004049a0
mov dword [ebp - 0xc], ecx
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
call fcn.00406d68
xor eax, eax
push ebp
push 0x52b51d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x24], edx
mov eax, dword [ebp - 4]
mov byte [eax + 0x21], 0
mov eax, dword [ebp - 4]
mov byte [eax + 0x20], 0
mov eax, dword [ebp - 4]
mov dword [eax + 0x1c], 0xffffffff
mov eax, dword [ebp - 4]
add eax, 0x18
xor edx, edx
call fcn.00406d80
mov eax, dword [ebp - 4]
mov byte [eax + 0x22], 0
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.004a6df8
mov eax, dword [ebp - 4]
add eax, 0xc
sub eax, 4
mov eax, dword [eax]
mov edx, dword [ebp - 4]
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
call fcn.004044bc
mov dl, 1
mov eax, dword [0x529ee8]
call fcn.00496c18
mov edx, dword [ebp - 4]
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
mov edx, dword [ebp - 4]
add edx, 0xc
sub edx, 4
mov dword [edx], eax
mov eax, dword [ebp - 4]
add eax, 0x10
mov edx, dword [ebp - 0xc]
call fcn.00406d80
mov eax, dword [ebp - 4]
cmp dword [eax + 0x10], 0
je 0x52b4e6
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 4]
call fcn.0052af1c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
call fcn.0047a474
test al, al
jne 0x52b4d6
lea edx, [ebp - 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
call fcn.0047aa74
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x52b43a
mov eax, dword [ebp - 0x1c]
sub eax, 0xa
cmp word [eax], 2
je 0x52b43a
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.00405d84
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x52b451
mov eax, dword [ebp - 0x20]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jle 0x52b45f
mov eax, dword [ebp - 0xc]
call fcn.0052b05c
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
call fcn.00406e0c
push eax
call sub.kernel32.dll_CreateFileW_1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x52b4d6
cmp dword [ebp + 8], 0
je 0x52b4cd
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov dword [eax + 0xc], edx
lea edx, [ebp - 0x14]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov eax, dword [ebp - 0x14]
call fcn.0040879c
test eax, eax
jle 0x52b4cd
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
call fcn.0040879c
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_WriteFile_1
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 4]
cmp dword [eax + 0x24], 0
je 0x52b4e6
mov eax, dword [ebp - 4]
mov byte [eax + 0x21], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
mov edx, dword [ebp - 4]
mov dword [eax + 0x34], edx
mov dword [eax + 0x30], 0x52b194
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x52b524
lea eax, [ebp - 0x14]
mov edx, dword [0x4774d0]
call fcn.00408a84
lea eax, [ebp - 0xc]
call fcn.00406d70
ret