Function at 0x408fa0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x469418
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x48b370]
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 ebx, dword [ebp + 8]
mov edi, ecx
mov dword [ebp - 0x3c], edi
cmp ebx, 0xffffffff
jne 0x408fdf
xor eax, eax
jmp 0x409215
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
xor edx, edx
cmp ecx, edx
je 0x40900a
mov eax, dword [edi + 0x34]
mov esi, dword [eax]
add esi, ecx
cmp ecx, esi
jae 0x40900a
dec dword [eax]
mov eax, dword [edi + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
mov byte [ecx], bl
mov eax, ebx
jmp 0x409215
cmp dword [edi + 0x54], edx
je 0x409212
mov ecx, dword [edi + 0x10]
lea esi, [edi + 0x48]
cmp dword [ecx], esi
jne 0x409031
mov eax, dword [edi + 0x40]
mov esi, dword [edi + 0x3c]
mov dword [ecx], esi
mov ecx, dword [edi + 0x20]
mov dword [ecx], eax
mov ecx, dword [edi + 0x30]
sub eax, eax
mov dword [ecx], eax
cmp dword [edi + 0x44], edx
jne 0x409056
mov eax, dword [edi + 0x54]
movsx edx, bl
push eax
push edx
call fcn.0044deb3
add esp, 8
cmp eax, 0xffffffff
je 0x409212
mov eax, ebx
jmp 0x409215
mov ecx, 0xf
mov dword [ebp - 0x18], ecx
xor eax, eax
mov byte [ebp - 0x2c], dl
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x1c], edx
mov byte [ebp - 0x30], bl
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], 8
cmp ecx, 0x10
jae 0x40907e
lea eax, [ebp - 0x2c]
mov byte [eax + 8], dl
mov dword [ebp - 4], edx
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
lea ebx, [ebx]
mov edx, dword [ebp - 0x1c]
mov esi, eax
cmp ebx, 0x10
jae 0x40909f
lea esi, [ebp - 0x2c]
mov eax, esi
mov ecx, dword [edi + 0x44]
mov ebx, dword [ecx]
lea edi, [ebp - 0x34]
push edi
mov edi, dword [ebp - 0x3c]
add edx, esi
push edx
push eax
lea eax, [ebp - 0x38]
push eax
lea edx, [ebp - 0x2f]
push edx
mov edx, dword [ebx + 0x14]
lea eax, [ebp - 0x30]
push eax
lea eax, [edi + 0x4c]
push eax
call edx
test eax, eax
js 0x409203
cmp eax, 1
jg 0x4091b1
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edx, eax
cmp ebx, 0x10
jae 0x4090e5
lea edx, [ebp - 0x2c]
mov esi, dword [ebp - 0x34]
sub esi, edx
je 0x409112
cmp ebx, 0x10
jae 0x4090f4
lea eax, [ebp - 0x2c]
mov ecx, dword [edi + 0x54]
push ecx
push esi
push 1
push eax
call fcn.0044de39
add esp, 0x10
cmp esi, eax
jne 0x409203
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0x30]
mov byte [edi + 0x49], 1
cmp dword [ebp - 0x38], edx
jne 0x4091e5
test esi, esi
jne 0x409090
mov edx, dword [ebp - 0x1c]
cmp edx, 0x20
jae 0x409203
or ecx, 0xffffffff
sub ecx, edx
cmp ecx, 8
jbe 0x4091f9
lea esi, [edx + 8]
cmp esi, 0xfffffffe
ja 0x4091f9
cmp ebx, esi
jae 0x40919a
push edx
push esi
lea ecx, [ebp - 0x2c]
call fcn.00405db7
mov ebx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x2c]
test esi, esi
je 0x409093
mov ecx, eax
cmp ebx, 0x10
jae 0x409179
lea ecx, [ebp - 0x2c]
xor eax, eax
mov dword [ecx + edx], eax
mov dword [ecx + edx + 4], eax
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], esi
jae 0x409191
lea eax, [ebp - 0x2c]
mov byte [eax + esi], 0
jmp 0x409084
test esi, esi
jne 0x40916f
mov dword [ebp - 0x1c], esi
cmp ebx, 0x10
jae 0x4091a9
lea eax, [ebp - 0x2c]
mov byte [eax], 0
jmp 0x409084
cmp eax, 3
jne 0x409203
mov edx, dword [edi + 0x54]
mov eax, dword [ebp - 0x30]
push edx
push eax
call fcn.00408f80
add esp, 8
test al, al
je 0x4091cf
mov esi, dword [ebp + 8]
jmp 0x4091d2
or esi, 0xffffffff
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
call fcn.004025cc
mov eax, esi
jmp 0x409215
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
call fcn.004025cc
mov eax, dword [ebp + 8]
jmp 0x409215
push 0x476a80
call fcn.00462317
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
call fcn.004025cc
or eax, 0xffffffff
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.0044cdc7
mov esp, ebp
pop ebp
ret 4