Function at 0x4da69f
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x568387
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x601328]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
push edi
mov eax, dword [0x601328]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, 0xffff
mov esi, ecx
cmp ax, di
jne 0x4da6f4
lea eax, [ebp + 8]
push eax
call fcn.004093c0
pop ecx
jmp 0x4da88e
mov eax, dword [esi + 0x24]
mov ecx, dword [eax]
xor ebx, ebx
cmp ecx, ebx
je 0x4da722
mov eax, dword [esi + 0x34]
mov edx, dword [eax]
lea edx, [ecx + edx*2]
cmp ecx, edx
jae 0x4da722
dec dword [eax]
mov esi, dword [esi + 0x24]
mov eax, dword [esi]
lea ecx, [eax + 2]
mov dword [esi], ecx
mov word [eax], di
mov ax, di
jmp 0x4da88e
mov eax, dword [esi + 0x4c]
cmp eax, ebx
je 0x4da889
cmp dword [esi + 0x3c], ebx
jne 0x4da74b
push eax
push edi
call fcn.004d9892
pop ecx
test al, al
pop ecx
movzx eax, di
jne 0x4da88e
jmp 0x4da889
movzx eax, di
push ebx
push 8
lea ecx, [esp + 0x4c]
mov dword [esp + 0x18], eax
call fcn.004dae06
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x48]
mov dword [esp + 0x74], ebx
call fcn.004dae2c
mov ecx, eax
call fcn.004db061
mov edi, dword [esp + 0x58]
mov ebx, eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x48]
call fcn.004dae2c
mov ecx, eax
call fcn.004db061
lea edx, [esp + 0x18]
add edi, ebx
push edx
lea ebx, [esi + 0x44]
jmp 0x4da85a
cmp eax, 1
jg 0x4da8ae
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x48]
call fcn.004dae2c
mov ecx, eax
call fcn.004db061
mov edi, dword [esp + 0x18]
sub edi, eax
je 0x4da7f3
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x48]
call fcn.004dae2c
mov ecx, eax
call fcn.004db061
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.0054a21c
add esp, 0x10
cmp edi, eax
jne 0x4da880
lea eax, [esp + 0x10]
mov byte [esi + 0x42], 1
cmp dword [esp + 0x1c], eax
jne 0x4da8dc
test edi, edi
ja 0x4da81d
cmp dword [esp + 0x58], 0x20
lea ecx, [esp + 0x44]
jae 0x4da884
push 0
push 8
call fcn.00405710
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x48]
call fcn.004dae2c
mov ecx, eax
call fcn.004db061
mov edi, dword [esp + 0x58]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x48]
call fcn.004dae2c
mov ecx, eax
call fcn.004db061
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x24]
add edi, edx
mov ecx, dword [esi + 0x3c]
push edi
push eax
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x22]
push edx
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x2c], eax
mov eax, dword [ecx]
push ebx
call dword [eax + 0x14]
test eax, eax
jge 0x4da7a1
lea ecx, [esp + 0x44]
call fcn.00408970
mov eax, 0xffff
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0054677c
mov esp, ebp
pop ebp
ret 4
cmp eax, 3
jne 0x4da880
push dword [esi + 0x4c]
push dword [esp + 0x14]
call fcn.004d9892
movzx esi, word [ebp + 8]
pop ecx
pop ecx
test al, al
jne 0x4da8ce
mov esi, 0xffff
lea ecx, [esp + 0x44]
call fcn.00408970
mov ax, si
jmp 0x4da88e
lea ecx, [esp + 0x44]
call fcn.00408970
mov ax, word [ebp + 8]
jmp 0x4da88e