Function at 0x5139d0
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x78
push 0xffffffffffffffff
push 0x6a9f26
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x7a1070]
xor eax, ebp
mov dword [ebp + 0x74], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp + 0x58], ecx
mov eax, dword [ebp + 0x58]
cmp dword [eax + 0x38], 0
je 0x513a14
mov ecx, dword [ebp + 0x58]
movzx edx, byte [ecx + 0x3d]
test edx, edx
jne 0x513a20
mov al, 1
jmp 0x513c49
mov dword [ebp - 0x10], 8
mov dword [ebp + 0x3c], 0xffffffff
mov eax, dword [ebp + 0x3c]
push eax
mov ecx, dword [ebp + 0x58]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x58]
mov eax, dword [edx + 0xc]
call eax
mov dword [ebp + 0x34], eax
mov dword [ebp + 0x38], 0xffffffff
mov ecx, dword [ebp + 0x38]
cmp ecx, dword [ebp + 0x34]
jne 0x513a5a
mov dword [ebp + 0x44], 1
jmp 0x513a61
mov dword [ebp + 0x44], 0
mov dl, byte [ebp + 0x44]
mov byte [ebp + 0x57], dl
movzx eax, byte [ebp + 0x57]
test eax, eax
je 0x513a76
xor al, al
jmp 0x513c49
push 0
push 8
lea ecx, [ebp + 0x5c]
call fcn.00511590
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp + 0x5c]
call fcn.004b0e60
mov dword [ebp + 0x30], eax
mov edx, dword [ebp + 0x30]
mov eax, dword [edx]
mov dword [ebp + 0x1c], eax
lea ecx, [ebp + 0x5c]
mov dword [ebp + 0x2c], ecx
mov edx, dword [ebp + 0x2c]
mov dword [ebp + 0x28], edx
mov eax, dword [ebp + 0x28]
add eax, 0x10
mov dword [ebp + 0x24], eax
mov ecx, dword [ebp + 0x24]
mov edx, dword [ecx]
mov dword [ebp + 0x18], edx
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp + 0x5c]
call fcn.004b0e60
mov dword [ebp + 0x20], eax
mov ecx, dword [ebp + 0x20]
mov edx, dword [ecx]
mov dword [ebp + 0x14], edx
mov eax, dword [ebp + 0x58]
mov ecx, dword [eax + 0x38]
mov dword [ebp + 0x40], ecx
mov edx, dword [ebp + 0x40]
mov eax, dword [edx]
lea ecx, [ebp + 0xc]
push ecx
mov edx, dword [ebp + 0x1c]
add edx, dword [ebp + 0x18]
push edx
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x58]
add edx, 0x40
push edx
mov ecx, dword [ebp + 0x40]
mov eax, dword [eax + 0x20]
call eax
mov dword [ebp + 0x48], eax
cmp dword [ebp + 0x48], 0
je 0x513b1e
cmp dword [ebp + 0x48], 1
je 0x513b25
cmp dword [ebp + 0x48], 3
je 0x513be4
jmp 0x513c07
mov ecx, dword [ebp + 0x58]
mov byte [ecx + 0x3d], 0
lea edx, [ebp - 0x1c]
push edx
lea ecx, [ebp + 0x5c]
call fcn.004b0e60
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov dword [ebp + 8], ecx
mov edx, dword [ebp + 0xc]
sub edx, dword [ebp + 8]
mov dword [ebp + 0x4c], edx
je 0x513ba2
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp + 0x5c]
call fcn.004b0e60
mov dword [ebp + 4], eax
mov ecx, dword [ebp + 4]
mov edx, dword [ecx]
mov dword [ebp], edx
mov eax, dword [ebp + 0x58]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp + 0x4c]
push edx
push 1
mov eax, dword [ebp]
push eax
call fcn.0067d4bc
add esp, 0x10
cmp dword [ebp + 0x4c], eax
je 0x513ba2
mov byte [ebp + 0x56], 0
mov dword [ebp - 4], 1
push 0
push 1
lea ecx, [ebp + 0x5c]
call fcn.004b1670
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp + 0x56]
jmp 0x513c49
mov ecx, dword [ebp + 0x58]
movzx edx, byte [ecx + 0x3d]
test edx, edx
jne 0x513bd0
mov byte [ebp + 0x55], 1
mov dword [ebp - 4], 2
push 0
push 1
lea ecx, [ebp + 0x5c]
call fcn.004b1670
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp + 0x55]
jmp 0x513c49
cmp dword [ebp + 0x4c], 0
jne 0x513be2
push 0
push 8
lea ecx, [ebp + 0x5c]
call fcn.00513620
jmp 0x513c2a
mov byte [ebp + 0x54], 1
mov dword [ebp - 4], 3
push 0
push 1
lea ecx, [ebp + 0x5c]
call fcn.004b1670
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp + 0x54]
jmp 0x513c49
mov byte [ebp + 0x53], 0
mov dword [ebp - 4], 4
push 0
push 1
lea ecx, [ebp + 0x5c]
call fcn.004b1670
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp + 0x53]
jmp 0x513c49
jmp 0x513a89
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp + 0x74]
xor ecx, ebp
call fcn.0065c160
add ebp, 0x78
mov esp, ebp
pop ebp
ret