Function at 0x408760
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d0248
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
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
xor esi, esi
mov dword [ebp - 0x30], ecx
cmp dword [ecx + 0x3c], esi
je 0x408a3d
cmp byte [ecx + 0x42], 0
je 0x408a3d
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push 0xffff
call edx
movzx eax, ax
mov ecx, 0xffff
cmp cx, ax
je 0x4088f4
mov ecx, 0xf
mov dword [ebp - 0x14], ecx
xor eax, eax
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], 8
cmp ecx, 0x10
jae 0x4087e6
lea eax, [ebp - 0x28]
mov byte [eax + 8], 0
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x4088fb
mov ebx, eax
mov dword [ebp - 0x34], ebx
test eax, eax
je 0x408826
mov ecx, eax
cmp edx, 0x10
jae 0x40880f
lea ecx, [ebp - 0x28]
cmp ecx, ebx
ja 0x408826
mov ecx, eax
cmp edx, 0x10
jae 0x40881d
lea ecx, [ebp - 0x28]
mov esi, dword [ebp - 0x18]
add ecx, esi
cmp ebx, ecx
jbe 0x408831
call fcn.004b32e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
cmp ecx, 0xfffffffc
je 0x408857
mov ecx, eax
cmp edx, 0x10
jae 0x408843
lea ecx, [ebp - 0x28]
mov esi, dword [ebp - 0x18]
add ecx, esi
cmp ebx, ecx
jb 0x408857
call fcn.004b32e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x18]
cmp edx, 0x10
jb 0x408906
mov esi, eax
test eax, eax
je 0x40888d
mov ecx, eax
cmp edx, 0x10
jae 0x408873
lea ecx, [ebp - 0x28]
cmp ecx, esi
ja 0x40888d
mov ecx, eax
cmp edx, 0x10
jae 0x408881
lea ecx, [ebp - 0x28]
mov ebx, dword [ebp - 0x18]
add ecx, ebx
mov ebx, dword [ebp - 0x34]
cmp esi, ecx
jbe 0x408898
call fcn.004b32e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
cmp ecx, 0xfffffffc
je 0x4088b6
cmp edx, 0x10
jae 0x4088a8
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x18]
add eax, edx
cmp esi, eax
jb 0x4088b6
call fcn.004b32e0
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x30]
add ebx, edi
push ebx
push esi
add eax, 0x44
push eax
call edx
sub eax, 0
je 0x40890e
sub eax, 1
je 0x408915
sub eax, 2
je 0x408a2e
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004a4d70
xor al, al
jmp 0x408a3f
lea ebx, [ebp - 0x28]
mov dword [ebp - 0x34], ebx
jmp 0x408805
lea esi, [ebp - 0x28]
jmp 0x408869
mov eax, dword [ebp - 0x30]
mov byte [eax + 0x42], 0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
cmp edx, 0x10
jb 0x408a1e
mov esi, eax
test eax, eax
je 0x40894b
mov ecx, eax
cmp edx, 0x10
jae 0x408934
lea ecx, [ebp - 0x28]
cmp ecx, esi
ja 0x40894b
mov ecx, eax
cmp edx, 0x10
jae 0x408942
lea ecx, [ebp - 0x28]
mov edi, dword [ebp - 0x18]
add ecx, edi
cmp esi, ecx
jbe 0x408956
call fcn.004b32e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
cmp ecx, 0xfffffffc
je 0x40897c
mov ecx, eax
cmp edx, 0x10
jae 0x408968
lea ecx, [ebp - 0x28]
mov edi, dword [ebp - 0x18]
add ecx, edi
cmp esi, ecx
jb 0x40897c
call fcn.004b32e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x38]
sub edi, esi
je 0x4089fd
cmp edx, 0x10
jb 0x408a26
mov esi, eax
test eax, eax
je 0x4089b3
mov ecx, eax
cmp edx, 0x10
jae 0x40899c
lea ecx, [ebp - 0x28]
cmp ecx, esi
ja 0x4089b3
mov ecx, eax
cmp edx, 0x10
jae 0x4089aa
lea ecx, [ebp - 0x28]
mov ebx, dword [ebp - 0x18]
add ecx, ebx
cmp esi, ecx
jbe 0x4089be
call fcn.004b32e0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
cmp ecx, 0xfffffffc
je 0x4089dc
cmp edx, 0x10
jae 0x4089ce
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x18]
add eax, edx
cmp esi, eax
jb 0x4089dc
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 0x4088e5
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x30]
cmp byte [ecx + 0x42], 0
je 0x408a2e
test edi, edi
jne 0x4087f3
push edi
push 8
lea ecx, [ebp - 0x2c]
call fcn.00408380
jmp 0x4087ed
lea esi, [ebp - 0x28]
jmp 0x40892a
lea esi, [ebp - 0x28]
jmp 0x408992
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.004a4d70
mov al, 1
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