Function at 0x100182e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004a562
mov eax, dword fs:[0]
push eax
mov eax, 0x40060
call fcn.100489c0
mov eax, dword [0x10059008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x4001c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x40018], eax
test eax, eax
je 0x10018619
mov esi, dword [ebp + 0x14]
cmp esi, 1
jl 0x10018619
push ecx
lea ecx, [ebp - 0x40044]
call fcn.1000fce0
push 0
lea ecx, [ebp - 0x40030]
mov dword [ebp - 4], 0
push ecx
mov ecx, eax
call fcn.10010340
cmp dword [ebp - 0x40038], 0
mov dword [ebp - 0x40034], 0
jl 0x10018386
mov eax, dword [ebp - 0x40040]
test eax, eax
je 0x10018386
push eax
call fcn.1002f05f
add esp, 4
cmp dword [ebp - 0x40020], 0
mov ebx, 0x10051170
mov ecx, ebx
mov dword [ebp - 0x40040], 0
cmovne ecx, dword [ebp - 0x4002c]
mov eax, ebx
test ecx, ecx
mov dword [ebp - 0x4003c], 0
mov word [ebp - 0x40038], 0
cmovne eax, ecx
mov byte [ebp - 0x40036], 0
mov dword [ebp - 0x40044], eax
mov dword [ebp - 0x40034], 4
push 0x10053b30
lea ecx, [ebp - 0x40044]
mov byte [ebp - 4], 3
call fcn.100016d0
push eax
call fcn.1002eea0
add esp, 8
mov dword [ebp - 0x40014], eax
test eax, eax
je 0x10018436
push eax
push esi
push 1
push dword [ebp - 0x40018]
call fcn.100350bc
push dword [ebp - 0x40014]
mov esi, eax
call fcn.1002ecaf
add esp, 0x14
cmp esi, dword [ebp + 0x14]
je 0x10018470
cmp dword [ebp - 0x40020], 0
cmovne ebx, dword [ebp - 0x4002c]
mov ecx, ebx
call fcn.10004fb0
xor bl, bl
lea ecx, [ebp - 0x40044]
call fcn.10001770
cmp dword [ebp - 0x40024], 0
mov dword [ebp - 0x40020], 0
jl 0x10018469
mov eax, dword [ebp - 0x4002c]
test eax, eax
je 0x10018469
push eax
call fcn.1002f05f
add esp, 4
mov al, bl
jmp 0x1001861b
push dword [ebp - 0x4001c]
lea ecx, [ebp - 0x4006c]
call fcn.1000fce0
push 0
lea ecx, [ebp - 0x40058]
mov byte [ebp - 4], 4
push ecx
mov ecx, eax
call fcn.10010340
lea ecx, [ebp - 0x4006c]
call fcn.10005170
cmp dword [ebp - 0x40048], 0
mov eax, ebx
push ecx
cmovne eax, dword [ebp - 0x40054]
lea ecx, [ebp - 0x4006c]
push eax
call fcn.100017f0
push 0x10053b30
mov byte [ebp - 4], 7
call fcn.100016d0
push eax
call fcn.1002eea0
add esp, 8
mov dword [ebp - 0x40014], eax
test eax, eax
jne 0x100184f0
cmp dword [ebp - 0x40020], eax
cmovne ebx, dword [ebp - 0x4002c]
jmp 0x100185f5
lea ecx, [ebp - 0x40044]
call fcn.100016d0
sub esp, 8
mov ecx, eax
call fcn.10020020
add esp, 8
mov dword [ebp - 0x40018], eax
cmp dword [edi + 0x50], 4
mov dword [edi + 0xc0], 0
jne 0x100185b9
cmp dword [eax + 0x13c4], 4
je 0x10018587
push ecx
lea ecx, [ebp - 0x40010]
mov edx, eax
push ecx
lea ecx, [ebp - 0x4001c]
call fcn.1001fd60
mov esi, eax
mov eax, dword [ebp - 0x4001c]
test eax, eax
je 0x10018551
cmp eax, 4
jne 0x100185b9
test esi, esi
js 0x100185b9
jle 0x10018587
push dword [ebp - 0x40014]
lea eax, [ebp - 0x40010]
push esi
push 1
push eax
call fcn.100350bc
add esp, 0x10
cmp eax, esi
jne 0x100185b9
add dword [edi + 0xc0], eax
cmp dword [edi + 0x50], 4
jne 0x100185b9
mov eax, dword [ebp - 0x40018]
jmp 0x10018522
push dword [ebp - 0x40014]
call fcn.1002ecaf
mov ecx, dword [ebp - 0x40018]
add esp, 4
call fcn.10020200
cmp dword [ebp - 0x40020], 0
cmovne ebx, dword [ebp - 0x4002c]
mov ecx, ebx
call fcn.10004fb0
mov bl, 1
jmp 0x100185fe
push dword [ebp - 0x40014]
call fcn.1002ecaf
mov ecx, dword [ebp - 0x40018]
add esp, 4
call fcn.10020200
cmp dword [ebp - 0x40020], 0
mov ecx, ebx
cmovne ecx, dword [ebp - 0x4002c]
call fcn.10004fb0
cmp dword [ebp - 0x40048], 0
cmovne ebx, dword [ebp - 0x40054]
mov ecx, ebx
call fcn.10004fb0
xor bl, bl
lea ecx, [ebp - 0x4006c]
call fcn.10001770
lea ecx, [ebp - 0x40058]
call fcn.10005170
jmp 0x10018438
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100288b6
mov esp, ebp
pop ebp
ret 0x10