Function at 0x417a70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c80f8
mov eax, dword fs:[0]
push eax
sub esp, 0x108
mov eax, dword [0x50545c]
xor eax, ebp
mov dword [ebp - 0x20], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x100], ecx
mov eax, 0xffff
mov word [ebp - 0x42], ax
movzx ecx, word [ebp + 8]
movzx edx, word [ebp - 0x42]
xor eax, eax
cmp edx, ecx
sete al
movzx ecx, al
test ecx, ecx
je 0x417b02
movzx edx, word [ebp + 8]
mov eax, 0xffff
movzx ecx, ax
cmp edx, ecx
je 0x417adc
movzx edx, word [ebp + 8]
mov dword [ebp - 0x104], edx
jmp 0x417af1
mov eax, 0xffff
movzx ecx, ax
neg ecx
sbb ecx, ecx
add ecx, 1
mov dword [ebp - 0x104], ecx
mov ax, word [ebp - 0x104]
jmp 0x417f85
mov edx, dword [ebp - 0x100]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
mov dword [ebp - 0x74], ecx
cmp dword [ebp - 0x74], 0
je 0x417bac
mov edx, dword [ebp - 0x100]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
mov dword [ebp - 0x78], ecx
mov edx, dword [ebp - 0x100]
mov eax, dword [edx + 0x24]
mov ecx, dword [ebp - 0x100]
mov edx, dword [ecx + 0x34]
mov ecx, dword [edx]
mov edx, dword [eax]
lea eax, [edx + ecx*2]
cmp dword [ebp - 0x78], eax
jae 0x417bac
mov cx, word [ebp + 8]
mov word [ebp - 0x7a], cx
mov edx, dword [ebp - 0x100]
mov eax, dword [edx + 0x34]
mov ecx, dword [eax]
sub ecx, 1
mov edx, dword [ebp - 0x100]
mov eax, dword [edx + 0x34]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x100]
mov edx, dword [ecx + 0x24]
mov eax, dword [edx]
mov dword [ebp - 0x108], eax
mov ecx, dword [ebp - 0x100]
mov edx, dword [ecx + 0x24]
mov eax, dword [edx]
add eax, 2
mov ecx, dword [ebp - 0x100]
mov edx, dword [ecx + 0x24]
mov dword [edx], eax
mov eax, dword [ebp - 0x108]
mov cx, word [ebp - 0x7a]
mov word [eax], cx
mov ax, word [ebp + 8]
jmp 0x417f85
mov edx, dword [ebp - 0x100]
cmp dword [edx + 0x4c], 0
jne 0x417bc7
mov eax, 0xffff
jmp 0x417f85
mov eax, dword [ebp - 0x100]
cmp dword [eax + 0x3c], 0
jne 0x417c36
mov cx, word [ebp + 8]
mov word [ebp - 0x7c], cx
mov edx, dword [ebp - 0x100]
mov eax, dword [edx + 0x4c]
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
push ecx
movzx edx, word [ebp - 0x7c]
push edx
call fcn.00495607
add esp, 8
movzx eax, ax
xor ecx, ecx
cmp eax, 0xffff
setne cl
movzx edx, cl
test edx, edx
je 0x417c19
mov ax, word [ebp + 8]
mov word [ebp - 0x10a], ax
jmp 0x417c25
mov ecx, 0xffff
mov word [ebp - 0x10a], cx
mov ax, word [ebp - 0x10a]
jmp 0x417f85
mov dword [ebp - 0x10], 8
mov dx, word [ebp + 8]
mov word [ebp - 0x18], dx
lea eax, [ebp - 0x89]
mov dword [ebp - 0x88], eax
push 0
push 0
lea ecx, [ebp - 0x3c]
call fcn.00410110
push 0
push 8
lea ecx, [ebp - 0x3c]
call fcn.0041c5c0
mov dword [ebp - 4], 0
cmp dword [ebp - 0x24], 0x10
jb 0x417c81
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x90], ecx
jmp 0x417c8a
lea edx, [ebp - 0x38]
mov dword [ebp - 0x90], edx
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x90]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.0041db30
lea ecx, [ebp - 0x4c]
call fcn.0041d5a0
mov dword [ebp - 0x94], eax
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x98], edx
cmp dword [ebp - 0x24], 0x10
jb 0x417cc5
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x9c], eax
jmp 0x417cce
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x9c], ecx
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x9c]
push eax
lea ecx, [ebp - 0x54]
call fcn.0041db30
lea ecx, [ebp - 0x54]
call fcn.0041d5a0
mov dword [ebp - 0xa0], eax
mov ecx, dword [ebp - 0x100]
mov edx, dword [ecx + 0x3c]
mov dword [ebp - 0xa4], edx
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x94]
add ecx, dword [ebp - 0x98]
push ecx
mov edx, dword [ebp - 0xa0]
push edx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x16]
push ecx
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x100]
add eax, 0x44
push eax
mov ecx, dword [ebp - 0xa4]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0xa4]
mov eax, dword [edx + 0x14]
call eax
mov dword [ebp - 0x110], eax
cmp dword [ebp - 0x110], 0
jl 0x417f4b
cmp dword [ebp - 0x110], 1
jle 0x417d6d
cmp dword [ebp - 0x110], 3
je 0x417ec8
jmp 0x417f4b
cmp dword [ebp - 0x24], 0x10
jb 0x417d7e
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0xa8], ecx
jmp 0x417d87
lea edx, [ebp - 0x38]
mov dword [ebp - 0xa8], edx
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0xa8]
push ecx
lea ecx, [ebp - 0x5c]
call fcn.0041db30
lea ecx, [ebp - 0x5c]
call fcn.0041d5a0
mov dword [ebp - 0xac], eax
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0xac]
mov dword [ebp - 0x40], edx
je 0x417e3e
cmp dword [ebp - 0x24], 0x10
jb 0x417dcb
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0xb0], eax
jmp 0x417dd4
lea ecx, [ebp - 0x38]
mov dword [ebp - 0xb0], ecx
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x64]
call fcn.0041db30
lea ecx, [ebp - 0x64]
call fcn.0041d5a0
mov dword [ebp - 0xb4], eax
mov ecx, dword [ebp - 0x100]
mov edx, dword [ecx + 0x4c]
push edx
mov eax, dword [ebp - 0x40]
push eax
push 1
mov ecx, dword [ebp - 0xb4]
push ecx
call fcn.004953fe
add esp, 0x10
cmp dword [ebp - 0x40], eax
je 0x417e3e
mov edx, 0xffff
mov word [ebp - 0x66], dx
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00410110
mov ax, word [ebp - 0x66]
jmp 0x417f85
mov eax, dword [ebp - 0x100]
mov byte [eax + 0x42], 1
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x18]
cmp ecx, edx
je 0x417e76
mov ax, word [ebp + 8]
mov word [ebp - 0x68], ax
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00410110
mov ax, word [ebp - 0x68]
jmp 0x417f85
cmp dword [ebp - 0x40], 0
jbe 0x417e7e
jmp 0x417ec3
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0xb8], ecx
cmp dword [ebp - 0xb8], 0x20
jae 0x417e9e
push 0
push 8
lea ecx, [ebp - 0x3c]
call fcn.0041a820
jmp 0x417ec3
mov edx, 0xffff
mov word [ebp - 0x6a], dx
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00410110
mov ax, word [ebp - 0x6a]
jmp 0x417f85
jmp 0x417f6d
mov eax, dword [ebp - 0x100]
mov ecx, dword [eax + 0x4c]
mov dword [ebp - 0xc4], ecx
mov dx, word [ebp - 0x18]
mov word [ebp - 0xc0], dx
mov eax, dword [ebp - 0xc4]
push eax
movzx ecx, word [ebp - 0xc0]
push ecx
call fcn.00495607
add esp, 8
movzx edx, ax
xor eax, eax
cmp edx, 0xffff
setne al
movzx ecx, al
test ecx, ecx
je 0x417f1b
mov dx, word [ebp + 8]
mov word [ebp - 0x112], dx
jmp 0x417f27
mov eax, 0xffff
mov word [ebp - 0x112], ax
mov cx, word [ebp - 0x112]
mov word [ebp - 0x6c], cx
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00410110
mov ax, word [ebp - 0x6c]
jmp 0x417f85
mov edx, 0xffff
mov word [ebp - 0x6e], dx
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.00410110
mov ax, word [ebp - 0x6e]
jmp 0x417f85
jmp 0x417c70
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.0049318c
mov esp, ebp
pop ebp
ret 4