Function at 0x4128a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x484958
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x4ab4ec]
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 esi, dword [ebp + 8]
mov eax, 0xffff
mov edx, ecx
mov dword [ebp - 0x30], edx
cmp ax, si
jne 0x4128e4
xor eax, eax
jmp 0x412c1b
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
xor edi, edi
cmp ecx, edi
je 0x412912
mov eax, dword [edx + 0x34]
mov ebx, dword [eax]
lea ebx, [ecx + ebx*2]
cmp ecx, ebx
jae 0x412912
dec dword [eax]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 2]
mov dword [eax], edx
mov word [ecx], si
mov ax, si
jmp 0x412c1b
mov eax, dword [edx + 0x4c]
cmp eax, edi
je 0x412c16
cmp dword [edx + 0x3c], edi
jne 0x412944
push eax
push esi
call fcn.0045892e
mov ecx, 0xffff
add esp, 8
cmp ax, cx
movzx eax, si
jne 0x412c1b
mov eax, ecx
jmp 0x412c1b
mov ecx, 0xf
mov dword [ebp - 0x14], ecx
xor eax, eax
movzx edx, si
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], 8
cmp ecx, 0x10
jae 0x412970
lea eax, [ebp - 0x28]
mov byte [eax + 8], 0
mov dword [ebp - 4], edi
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x14]
lea ecx, [ecx]
cmp edx, 0x10
jb 0x412b96
mov ebx, eax
mov dword [ebp - 0x38], ebx
test eax, eax
je 0x4129b3
mov ecx, eax
cmp edx, 0x10
jae 0x41299c
lea ecx, [ebp - 0x28]
cmp ecx, ebx
ja 0x4129b3
mov ecx, eax
cmp edx, 0x10
jae 0x4129aa
lea ecx, [ebp - 0x28]
mov esi, dword [ebp - 0x18]
add ecx, esi
cmp ebx, ecx
jbe 0x4129be
call fcn.0045747f
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
cmp ecx, 0xfffffffc
je 0x4129e4
mov ecx, eax
cmp edx, 0x10
jae 0x4129d0
lea ecx, [ebp - 0x28]
mov esi, dword [ebp - 0x18]
add ecx, esi
cmp ebx, ecx
jb 0x4129e4
call fcn.0045747f
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x18]
cmp edx, 0x10
jb 0x412ba1
mov esi, eax
test eax, eax
je 0x412a1a
mov ecx, eax
cmp edx, 0x10
jae 0x412a00
lea ecx, [ebp - 0x28]
cmp ecx, esi
ja 0x412a1a
mov ecx, eax
cmp edx, 0x10
jae 0x412a0e
lea ecx, [ebp - 0x28]
mov ebx, dword [ebp - 0x18]
add ecx, ebx
mov ebx, dword [ebp - 0x38]
cmp esi, ecx
jbe 0x412a25
call fcn.0045747f
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
cmp ecx, 0xfffffffc
je 0x412a43
cmp edx, 0x10
jae 0x412a35
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x18]
add eax, edx
cmp esi, eax
jb 0x412a43
call fcn.0045747f
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea eax, [ebp - 0x40]
push eax
add ebx, edi
push ebx
push esi
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x32]
push eax
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x30]
add eax, 0x44
push eax
call edx
test eax, eax
jl 0x412c07
cmp eax, 1
jg 0x412bb9
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
cmp edx, 0x10
jb 0x412ba9
mov esi, eax
test eax, eax
je 0x412ab2
mov ecx, eax
cmp edx, 0x10
jae 0x412a9b
lea ecx, [ebp - 0x28]
cmp ecx, esi
ja 0x412ab2
mov ecx, eax
cmp edx, 0x10
jae 0x412aa9
lea ecx, [ebp - 0x28]
mov edi, dword [ebp - 0x18]
add ecx, edi
cmp esi, ecx
jbe 0x412abd
call fcn.0045747f
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
cmp ecx, 0xfffffffc
je 0x412ae3
mov ecx, eax
cmp edx, 0x10
jae 0x412acf
lea ecx, [ebp - 0x28]
mov edi, dword [ebp - 0x18]
add ecx, edi
cmp esi, ecx
jb 0x412ae3
call fcn.0045747f
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x40]
sub edi, esi
je 0x412b64
cmp edx, 0x10
jb 0x412bb1
mov esi, eax
test eax, eax
je 0x412b1a
mov ecx, eax
cmp edx, 0x10
jae 0x412b03
lea ecx, [ebp - 0x28]
cmp ecx, esi
ja 0x412b1a
mov ecx, eax
cmp edx, 0x10
jae 0x412b11
lea ecx, [ebp - 0x28]
mov ebx, dword [ebp - 0x18]
add ecx, ebx
cmp esi, ecx
jbe 0x412b25
call fcn.0045747f
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
cmp ecx, 0xfffffffc
je 0x412b43
cmp edx, 0x10
jae 0x412b35
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x18]
add eax, edx
cmp esi, eax
jb 0x412b43
call fcn.0045747f
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x4c]
push ecx
push edi
push 1
push esi
call fcn.00458eef
add esp, 0x10
cmp edi, eax
jne 0x412c07
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x30]
mov byte [ecx + 0x42], 1
lea ecx, [ebp - 0x34]
cmp dword [ebp - 0x3c], ecx
jne 0x412bf2
test edi, edi
ja 0x412980
cmp dword [ebp - 0x18], 0x20
jae 0x412c07
push 0
push 8
lea ecx, [ebp - 0x2c]
call fcn.00412350
jmp 0x412977
lea ebx, [ebp - 0x28]
mov dword [ebp - 0x38], ebx
jmp 0x412992
lea esi, [ebp - 0x28]
jmp 0x4129f6
lea esi, [ebp - 0x28]
jmp 0x412a91
lea esi, [ebp - 0x28]
jmp 0x412af9
cmp eax, 3
jne 0x412c07
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0x4c]
mov ecx, dword [ebp - 0x34]
push eax
push ecx
call fcn.0040f090
movzx esi, word [ebp + 8]
add esp, 8
test al, al
jne 0x412bde
mov esi, 0xffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00403a90
mov ax, si
jmp 0x412c1b
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00403a90
mov ax, word [ebp + 8]
jmp 0x412c1b
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00403a90
mov eax, 0xffff
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.0045718a
mov esp, ebp
pop ebp
ret 4