Function at 0x410130
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x47908c]
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 0x410164
mov dword [ebp - 0x68], 1
jmp 0x41016b
mov dword [ebp - 0x68], 0
mov al, byte [ebp - 0x68]
mov byte [ebp - 0x3d], al
movzx ecx, byte [ebp - 0x3d]
test ecx, ecx
je 0x4101d3
mov edx, 0xffff
mov word [ebp - 0x4a], dx
movzx eax, word [ebp + 8]
movzx ecx, word [ebp - 0x4a]
cmp eax, ecx
je 0x410198
mov dx, word [ebp + 8]
mov word [ebp - 0x42], dx
jmp 0x4101c2
mov eax, 0xffff
mov word [ebp - 0x4c], ax
movzx ecx, word [ebp - 0x4c]
test ecx, ecx
jne 0x4101b4
mov edx, 1
mov word [ebp - 0x40], dx
jmp 0x4101ba
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 0x410456
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 0x410268
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 0x410268
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 0x410456
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 0x4c], 0
jne 0x410283
mov edx, 0xffff
mov word [ebp - 0x50], dx
mov ax, word [ebp - 0x50]
jmp 0x410456
mov ecx, dword [ebp - 0x38]
call fcn.00414ce0
mov eax, dword [ebp - 0x38]
cmp dword [eax + 0x38], 0
jne 0x41030b
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.00441c05
add esp, 8
movzx ecx, ax
cmp ecx, 0xffff
je 0x4102d8
mov dword [ebp - 0x6c], 1
jmp 0x4102df
mov dword [ebp - 0x6c], 0
movzx edx, byte [ebp - 0x6c]
test edx, edx
je 0x4102f1
mov ax, word [ebp + 8]
mov word [ebp - 0x3a], ax
jmp 0x410302
mov cx, word [ebp - 0x76]
mov word [ebp - 0x3a], cx
mov edx, 0xffff
mov word [ebp - 0x3a], dx
mov ax, word [ebp - 0x3a]
jmp 0x410456
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 0x410376
cmp dword [ebp - 0x5c], 1
je 0x410376
cmp dword [ebp - 0x5c], 3
je 0x4103da
jmp 0x410449
mov ecx, dword [ebp - 0x34]
lea edx, [ebp - 0x28]
sub ecx, edx
mov dword [ebp - 0x60], ecx
je 0x4103b3
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.00442ad5
add esp, 0x10
cmp dword [ebp - 0x60], eax
je 0x4103b3
mov ecx, 0xffff
mov word [ebp - 0x52], cx
mov ax, word [ebp - 0x52]
jmp 0x410456
mov edx, dword [ebp - 0x38]
mov byte [edx + 0x3e], 1
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x30], eax
je 0x4103cb
mov ax, word [ebp + 8]
jmp 0x410456
mov ecx, 0xffff
mov word [ebp - 0x54], cx
mov ax, word [ebp - 0x54]
jmp 0x410456
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.00441c05
add esp, 8
movzx ecx, ax
cmp ecx, 0xffff
je 0x410416
mov dword [ebp - 0x74], 1
jmp 0x41041d
mov dword [ebp - 0x74], 0
movzx edx, byte [ebp - 0x74]
test edx, edx
je 0x41042f
mov ax, word [ebp + 8]
mov word [ebp - 0x3c], ax
jmp 0x410443
mov cx, word [ebp - 0x96]
mov word [ebp - 0x3c], cx
mov edx, 0xffff
mov word [ebp - 0x3c], dx
mov ax, word [ebp - 0x3c]
jmp 0x410456
mov eax, 0xffff
mov word [ebp - 0x62], ax
mov ax, word [ebp - 0x62]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00439e40
mov esp, ebp
pop ebp
ret 4