Function at 0x1002a570
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x100a7084]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x38], ecx
mov eax, 0xffff
mov word [ebp - 0x48], ax
movzx ecx, word [ebp - 0x48]
movzx edx, word [ebp + 8]
cmp ecx, edx
jne 0x1002a5a4
mov dword [ebp - 0x68], 1
jmp 0x1002a5ab
mov dword [ebp - 0x68], 0
mov al, byte [ebp - 0x68]
mov byte [ebp - 0x3d], al
movzx ecx, byte [ebp - 0x3d]
test ecx, ecx
je 0x1002a613
mov edx, 0xffff
mov word [ebp - 0x4a], dx
movzx eax, word [ebp + 8]
movzx ecx, word [ebp - 0x4a]
cmp eax, ecx
je 0x1002a5d8
mov dx, word [ebp + 8]
mov word [ebp - 0x42], dx
jmp 0x1002a602
mov eax, 0xffff
mov word [ebp - 0x4c], ax
movzx ecx, word [ebp - 0x4c]
test ecx, ecx
jne 0x1002a5f4
mov edx, 1
mov word [ebp - 0x40], dx
jmp 0x1002a5fa
xor eax, eax
mov word [ebp - 0x40], ax
mov cx, word [ebp - 0x40]
mov word [ebp - 0x42], cx
mov dx, word [ebp - 0x42]
mov word [ebp - 0x4e], dx
mov ax, word [ebp - 0x4e]
jmp 0x1002a896
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x20]
mov edx, dword [ecx]
mov dword [ebp - 0x7c], edx
cmp dword [ebp - 0x7c], 0
je 0x1002a6a8
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x20]
mov edx, dword [ecx]
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x30]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x20]
mov eax, dword [ecx]
lea ecx, [eax + edx*2]
cmp dword [ebp - 0x80], ecx
jae 0x1002a6a8
mov dx, word [ebp - 0x8e]
mov word [ebp - 0x44], dx
mov ax, word [ebp + 8]
mov word [ebp - 0x44], ax
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0x30]
mov eax, dword [edx]
sub eax, 1
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0x30]
mov dword [edx], eax
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x20]
mov edx, dword [ecx]
mov dword [ebp - 0x84], edx
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x20]
mov edx, dword [ecx]
add edx, 2
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x20]
mov dword [ecx], edx
mov edx, dword [ebp - 0x84]
mov ax, word [ebp - 0x44]
mov word [edx], ax
mov ax, word [ebp + 8]
jmp 0x1002a896
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 0x4c], 0
jne 0x1002a6c3
mov edx, 0xffff
mov word [ebp - 0x50], dx
mov ax, word [ebp - 0x50]
jmp 0x1002a896
mov ecx, dword [ebp - 0x38]
call fcn.10027c10
mov eax, dword [ebp - 0x38]
cmp dword [eax + 0x38], 0
jne 0x1002a74b
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0x4c]
mov dword [ebp - 0x88], edx
mov ax, word [ebp - 0x78]
mov word [ebp - 0x46], ax
mov cx, word [ebp + 8]
mov word [ebp - 0x46], cx
mov edx, dword [ebp - 0x88]
push edx
movzx eax, word [ebp - 0x46]
push eax
call fcn.1004fa93
add esp, 8
movzx ecx, ax
cmp ecx, 0xffff
je 0x1002a718
mov dword [ebp - 0x6c], 1
jmp 0x1002a71f
mov dword [ebp - 0x6c], 0
movzx edx, byte [ebp - 0x6c]
test edx, edx
je 0x1002a731
mov ax, word [ebp + 8]
mov word [ebp - 0x3a], ax
jmp 0x1002a742
mov cx, word [ebp - 0x76]
mov word [ebp - 0x3a], cx
mov edx, 0xffff
mov word [ebp - 0x3a], dx
mov ax, word [ebp - 0x3a]
jmp 0x1002a896
mov dword [ebp - 0x9c], 0x20
mov ax, word [ebp + 8]
mov word [ebp - 0x2c], ax
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0x38]
mov dword [ebp - 0x70], edx
mov eax, dword [ebp - 0x70]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x1c]
mov dword [ebp - 0x8c], edx
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x2a]
push ecx
lea edx, [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x38]
add eax, 0x40
push eax
mov ecx, dword [ebp - 0x70]
call dword [ebp - 0x8c]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x1002a7b6
cmp dword [ebp - 0x5c], 1
je 0x1002a7b6
cmp dword [ebp - 0x5c], 3
je 0x1002a81a
jmp 0x1002a889
mov ecx, dword [ebp - 0x34]
lea edx, [ebp - 0x28]
sub ecx, edx
mov dword [ebp - 0x60], ecx
je 0x1002a7f3
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp - 0x60]
push edx
push 1
lea eax, [ebp - 0x28]
push eax
call fcn.10050a93
add esp, 0x10
cmp dword [ebp - 0x60], eax
je 0x1002a7f3
mov ecx, 0xffff
mov word [ebp - 0x52], cx
mov ax, word [ebp - 0x52]
jmp 0x1002a896
mov edx, dword [ebp - 0x38]
mov byte [edx + 0x3e], 1
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x30], eax
je 0x1002a80b
mov ax, word [ebp + 8]
jmp 0x1002a896
mov ecx, 0xffff
mov word [ebp - 0x54], cx
mov ax, word [ebp - 0x54]
jmp 0x1002a896
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x4c]
mov dword [ebp - 0x94], eax
mov cx, word [ebp - 0x2c]
mov word [ebp - 0x58], cx
mov edx, dword [ebp - 0x94]
push edx
movzx eax, word [ebp - 0x58]
push eax
call fcn.1004fa93
add esp, 8
movzx ecx, ax
cmp ecx, 0xffff
je 0x1002a856
mov dword [ebp - 0x74], 1
jmp 0x1002a85d
mov dword [ebp - 0x74], 0
movzx edx, byte [ebp - 0x74]
test edx, edx
je 0x1002a86f
mov ax, word [ebp + 8]
mov word [ebp - 0x3c], ax
jmp 0x1002a883
mov cx, word [ebp - 0x96]
mov word [ebp - 0x3c], cx
mov edx, 0xffff
mov word [ebp - 0x3c], dx
mov ax, word [ebp - 0x3c]
jmp 0x1002a896
mov eax, 0xffff
mov word [ebp - 0x62], ax
mov ax, word [ebp - 0x62]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10044f41
mov esp, ebp
pop ebp
ret 4