Function at 0x408c30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d45c8
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x50f52c]
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 0x408c74
xor eax, eax
jmp 0x408f96
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
xor edi, edi
cmp ecx, edi
je 0x408ca2
mov eax, dword [edx + 0x34]
mov ebx, dword [eax]
lea ebx, [ecx + ebx*2]
cmp ecx, ebx
jae 0x408ca2
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 0x408f96
mov eax, dword [edx + 0x4c]
cmp eax, edi
je 0x408f91
cmp dword [edx + 0x3c], edi
jne 0x408cc9
push eax
push esi
call fcn.004072c0
test al, al
movzx eax, si
jne 0x408f96
jmp 0x408f91
movzx eax, si
mov ecx, 0xf
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x34], eax
xor eax, eax
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], 8
cmp ecx, 0x10
jae 0x408cf5
lea eax, [ebp - 0x28]
mov byte [eax + 8], 0
mov dword [ebp - 4], edi
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x408f14
mov ebx, eax
mov dword [ebp - 0x38], ebx
test eax, eax
je 0x408d35
mov ecx, eax
cmp edx, 0x10
jae 0x408d1e
lea ecx, [ebp - 0x28]
cmp ecx, ebx
ja 0x408d35
mov ecx, eax
cmp edx, 0x10
jae 0x408d2c
lea ecx, [ebp - 0x28]
mov esi, dword [ebp - 0x18]
add ecx, esi
cmp ebx, ecx
jbe 0x408d40
call fcn.004b32e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
cmp ecx, 0xfffffffc
je 0x408d66
mov ecx, eax
cmp edx, 0x10
jae 0x408d52
lea ecx, [ebp - 0x28]
mov esi, dword [ebp - 0x18]
add ecx, esi
cmp ebx, ecx
jb 0x408d66
call fcn.004b32e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x18]
cmp edx, 0x10
jb 0x408f1f
mov esi, eax
test eax, eax
je 0x408d9c
mov ecx, eax
cmp edx, 0x10
jae 0x408d82
lea ecx, [ebp - 0x28]
cmp ecx, esi
ja 0x408d9c
mov ecx, eax
cmp edx, 0x10
jae 0x408d90
lea ecx, [ebp - 0x28]
mov ebx, dword [ebp - 0x18]
add ecx, ebx
mov ebx, dword [ebp - 0x38]
cmp esi, ecx
jbe 0x408da7
call fcn.004b32e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
cmp ecx, 0xfffffffc
je 0x408dc5
cmp edx, 0x10
jae 0x408db7
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x18]
add eax, edx
cmp esi, eax
jb 0x408dc5
call fcn.004b32e0
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 0x408f82
cmp eax, 1
jg 0x408f37
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
cmp edx, 0x10
jb 0x408f27
mov esi, eax
test eax, eax
je 0x408e34
mov ecx, eax
cmp edx, 0x10
jae 0x408e1d
lea ecx, [ebp - 0x28]
cmp ecx, esi
ja 0x408e34
mov ecx, eax
cmp edx, 0x10
jae 0x408e2b
lea ecx, [ebp - 0x28]
mov edi, dword [ebp - 0x18]
add ecx, edi
cmp esi, ecx
jbe 0x408e3f
call fcn.004b32e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
cmp ecx, 0xfffffffc
je 0x408e65
mov ecx, eax
cmp edx, 0x10
jae 0x408e51
lea ecx, [ebp - 0x28]
mov edi, dword [ebp - 0x18]
add ecx, edi
cmp esi, ecx
jb 0x408e65
call fcn.004b32e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x40]
sub edi, esi
je 0x408ee6
cmp edx, 0x10
jb 0x408f2f
mov esi, eax
test eax, eax
je 0x408e9c
mov ecx, eax
cmp edx, 0x10
jae 0x408e85
lea ecx, [ebp - 0x28]
cmp ecx, esi
ja 0x408e9c
mov ecx, eax
cmp edx, 0x10
jae 0x408e93
lea ecx, [ebp - 0x28]
mov ebx, dword [ebp - 0x18]
add ecx, ebx
cmp esi, ecx
jbe 0x408ea7
call fcn.004b32e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
cmp ecx, 0xfffffffc
je 0x408ec5
cmp edx, 0x10
jae 0x408eb7
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x18]
add eax, edx
cmp esi, eax
jb 0x408ec5
call fcn.004b32e0
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x4c]
push ecx
push edi
push 1
push esi
call fcn.004b4616
add esp, 0x10
cmp edi, eax
jne 0x408f82
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 0x408f6d
test edi, edi
ja 0x408d02
cmp dword [ebp - 0x18], 0x20
jae 0x408f82
push 0
push 8
lea ecx, [ebp - 0x2c]
call fcn.00408380
jmp 0x408cfc
lea ebx, [ebp - 0x28]
mov dword [ebp - 0x38], ebx
jmp 0x408d14
lea esi, [ebp - 0x28]
jmp 0x408d78
lea esi, [ebp - 0x28]
jmp 0x408e13
lea esi, [ebp - 0x28]
jmp 0x408e7b
cmp eax, 3
jne 0x408f82
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0x4c]
mov ecx, dword [ebp - 0x34]
push eax
push ecx
call fcn.004072c0
movzx esi, word [ebp + 8]
test al, al
jne 0x408f59
mov esi, 0xffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004a4d70
mov ax, si
jmp 0x408f96
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004a4d70
mov ax, word [ebp + 8]
jmp 0x408f96
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004a4d70
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.004b3057
mov esp, ebp
pop ebp
ret 4