Function at 0x10005040
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100249e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x78
push ebx
push esi
mov dword [ebp - 0x78], ecx
call fcn.100030e0
mov dword [ebp - 0x40], eax
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x40]
push ecx
call fcn.100030c0
add esp, 8
movzx edx, al
test edx, edx
je 0x10005095
lea eax, [ebp + 8]
push eax
call fcn.100030f0
add esp, 4
jmp 0x1000533b
mov ecx, dword [ebp - 0x78]
call fcn.10005f60
test eax, eax
je 0x100050dc
mov ecx, dword [ebp - 0x78]
call fcn.10005f60
mov esi, eax
mov ecx, dword [ebp - 0x78]
call fcn.10006020
cmp esi, eax
jae 0x100050dc
lea ecx, [ebp + 8]
push ecx
call fcn.100030a0
add esp, 4
mov bl, al
mov ecx, dword [ebp - 0x78]
call fcn.10006140
mov byte [eax], bl
mov eax, dword [ebp + 8]
jmp 0x1000533b
mov edx, dword [ebp - 0x78]
cmp dword [edx + 0x4c], 0
jne 0x100050f4
call fcn.100030e0
jmp 0x1000533b
mov eax, dword [ebp - 0x78]
cmp dword [eax + 0x3c], 0
jne 0x10005140
mov ecx, dword [ebp - 0x78]
mov edx, dword [ecx + 0x4c]
push edx
lea eax, [ebp + 8]
push eax
call fcn.100030a0
add esp, 4
movzx ecx, al
push ecx
call fcn.10004150
add esp, 8
movzx edx, al
test edx, edx
je 0x1000512b
mov eax, dword [ebp + 8]
mov dword [ebp - 0x7c], eax
jmp 0x10005133
call fcn.100030e0
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x7c]
jmp 0x1000533b
mov dword [ebp - 0x10], 8
lea ecx, [ebp + 8]
push ecx
call fcn.100030a0
add esp, 4
mov byte [ebp - 0x15], al
push 0
push 8
lea ecx, [ebp - 0x38]
call fcn.10005c90
mov dword [ebp - 4], 0
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x38]
call fcn.10002b60
mov ecx, eax
call fcn.10006920
mov esi, eax
lea ecx, [ebp - 0x38]
call fcn.10007be0
add esi, eax
push esi
lea ecx, [ebp - 0x50]
push ecx
lea ecx, [ebp - 0x38]
call fcn.10002b60
mov ecx, eax
call fcn.10006920
push eax
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x15]
push ecx
mov edx, dword [ebp - 0x78]
add edx, 0x44
push edx
mov eax, dword [ebp - 0x78]
mov ecx, dword [eax + 0x3c]
call fcn.10006840
mov dword [ebp - 0x80], eax
cmp dword [ebp - 0x80], 0
jl 0x1000530b
cmp dword [ebp - 0x80], 1
jle 0x100051e1
cmp dword [ebp - 0x80], 3
je 0x100052bd
jmp 0x1000530b
lea ecx, [ebp - 0x58]
push ecx
lea ecx, [ebp - 0x38]
call fcn.10002b60
mov ecx, eax
call fcn.10006920
mov edx, dword [ebp - 0x1c]
sub edx, eax
mov dword [ebp - 0x3c], edx
je 0x1000524b
mov eax, dword [ebp - 0x78]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
push 1
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x38]
call fcn.10002b60
mov ecx, eax
call fcn.10006920
push eax
call sub.MSVCR90.dll_fwrite
add esp, 0x10
cmp dword [ebp - 0x3c], eax
je 0x1000524b
call fcn.100030e0
mov dword [ebp - 0x64], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.10001540
mov eax, dword [ebp - 0x64]
jmp 0x1000533b
mov ecx, dword [ebp - 0x78]
mov byte [ecx + 0x41], 1
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x15]
cmp edx, eax
je 0x10005279
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.10001540
mov eax, dword [ebp - 0x68]
jmp 0x1000533b
cmp dword [ebp - 0x3c], 0
jbe 0x10005281
jmp 0x100052bb
lea ecx, [ebp - 0x38]
call fcn.10007be0
cmp eax, 0x20
jae 0x1000529c
push 0
push 8
lea ecx, [ebp - 0x38]
call fcn.10005cd0
jmp 0x100052bb
call fcn.100030e0
mov dword [ebp - 0x6c], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.10001540
mov eax, dword [ebp - 0x6c]
jmp 0x1000533b
jmp 0x10005327
mov edx, dword [ebp - 0x78]
mov eax, dword [edx + 0x4c]
push eax
movzx ecx, byte [ebp - 0x15]
push ecx
call fcn.10004150
add esp, 8
movzx edx, al
test edx, edx
je 0x100052e3
mov eax, dword [ebp + 8]
mov dword [ebp - 0x84], eax
jmp 0x100052ee
call fcn.100030e0
mov dword [ebp - 0x84], eax
mov ecx, dword [ebp - 0x84]
mov dword [ebp - 0x70], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.10001540
mov eax, dword [ebp - 0x70]
jmp 0x1000533b
call fcn.100030e0
mov dword [ebp - 0x74], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.10001540
mov eax, dword [ebp - 0x74]
jmp 0x1000533b
jmp 0x10005169
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4