Function at 0x100226e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x100d0320]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x60], 0xffffffff
mov eax, dword [ebp - 0x60]
cmp eax, dword [ebp + 8]
jne 0x1002270b
mov dword [ebp - 0x40], 1
jmp 0x10022712
mov dword [ebp - 0x40], 0
movzx ecx, byte [ebp - 0x40]
test ecx, ecx
je 0x1002274b
cmp dword [ebp + 8], 0xffffffff
je 0x10022728
mov edx, dword [ebp + 8]
mov dword [ebp - 0x48], edx
jmp 0x10022743
or eax, 0xffffffff
jne 0x10022736
mov dword [ebp - 0x44], 1
jmp 0x1002273d
mov dword [ebp - 0x44], 0
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x48], ecx
mov eax, dword [ebp - 0x48]
jmp 0x10022906
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x20]
mov ecx, dword [eax]
mov dword [ebp - 0x64], ecx
cmp dword [ebp - 0x64], 0
je 0x10022797
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x20]
mov ecx, dword [eax]
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x30]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 0x20]
mov ecx, dword [edx]
add ecx, dword [eax]
cmp dword [ebp - 0x68], ecx
jae 0x10022797
mov dl, byte [ebp + 8]
mov byte [ebp - 0x2f], dl
mov ecx, dword [ebp - 0x2c]
call fcn.10020530
mov cl, byte [ebp - 0x2f]
mov byte [eax], cl
mov eax, dword [ebp + 8]
jmp 0x10022906
mov edx, dword [ebp - 0x2c]
cmp dword [edx + 0x4c], 0
jne 0x100227a8
or eax, 0xffffffff
jmp 0x10022906
mov ecx, dword [ebp - 0x2c]
call fcn.10020580
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x38], 0
jne 0x1002280d
mov cl, byte [ebp + 8]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x4c]
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0x6c]
push ecx
movsx edx, byte [ebp - 0x30]
push edx
call fcn.1005ff9b
add esp, 8
cmp eax, 0xffffffff
je 0x100227e7
mov dword [ebp - 0x4c], 1
jmp 0x100227ee
mov dword [ebp - 0x4c], 0
movzx eax, byte [ebp - 0x4c]
test eax, eax
je 0x100227fe
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x50], ecx
jmp 0x10022805
mov dword [ebp - 0x50], 0xffffffff
mov eax, dword [ebp - 0x50]
jmp 0x10022906
mov dword [ebp - 0x7c], 0x20
mov dl, byte [ebp + 8]
mov byte [ebp - 0x2e], dl
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x38]
mov dword [ebp - 0x54], ecx
lea edx, [ebp - 0x70]
push edx
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x74]
push edx
lea eax, [ebp - 0x2d]
push eax
lea ecx, [ebp - 0x2e]
push ecx
mov edx, dword [ebp - 0x2c]
add edx, 0x40
push edx
mov eax, dword [ebp - 0x54]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x54]
mov eax, dword [edx + 0x1c]
call eax
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x10022869
cmp dword [ebp - 0x38], 1
je 0x10022869
cmp dword [ebp - 0x38], 3
je 0x100228b2
jmp 0x10022903
mov ecx, dword [ebp - 0x70]
lea edx, [ebp - 0x28]
sub ecx, edx
mov dword [ebp - 0x3c], ecx
je 0x10022899
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
push 1
lea eax, [ebp - 0x28]
push eax
call fcn.10060a5d
add esp, 0x10
cmp dword [ebp - 0x3c], eax
je 0x10022899
or eax, 0xffffffff
jmp 0x10022906
mov ecx, dword [ebp - 0x2c]
mov byte [ecx + 0x3d], 1
lea edx, [ebp - 0x2e]
cmp dword [ebp - 0x74], edx
je 0x100228ad
mov eax, dword [ebp + 8]
jmp 0x10022906
or eax, 0xffffffff
jmp 0x10022906
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x4c]
mov dword [ebp - 0x78], ecx
mov dl, byte [ebp - 0x2e]
mov byte [ebp - 0x34], dl
mov eax, dword [ebp - 0x78]
push eax
movsx ecx, byte [ebp - 0x34]
push ecx
call fcn.1005ff9b
add esp, 8
cmp eax, 0xffffffff
je 0x100228e0
mov dword [ebp - 0x58], 1
jmp 0x100228e7
mov dword [ebp - 0x58], 0
movzx edx, byte [ebp - 0x58]
test edx, edx
je 0x100228f7
mov eax, dword [ebp + 8]
mov dword [ebp - 0x5c], eax
jmp 0x100228fe
mov dword [ebp - 0x5c], 0xffffffff
mov eax, dword [ebp - 0x5c]
jmp 0x10022906
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1004d440
mov esp, ebp
pop ebp
ret 4