Function at 0x490870
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
mov dword [ebp - 4], edx
push edi
cmp dword [esi + 0x698], 0
je 0x490890
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x618]
test eax, eax
je 0x490887
movzx eax, word [eax]
cmp eax, 2
je 0x4908a7
cmp eax, 1
jne 0x490887
cmp dword [esi + 0x678], 0
jne 0x490887
mov eax, dword [esi + 0x640]
imul eax, dword [ebp + 8]
add eax, 0x20
push eax
call fcn.00497cab
mov ebx, eax
add esp, 4
mov dword [ebp - 0xc], ebx
test ebx, ebx
jne 0x4908e2
push 0x10
push str.malloc
push 0x4c9a90
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edi, dword [esi + 0x630]
test edi, edi
jne 0x490918
lea eax, [esi + 0x30c]
cmp dword [esi + 0x64c], edi
jne 0x490900
lea eax, [esi + 0x208]
push 0x4c3d40
push eax
call fcn.00494396
mov edi, eax
add esp, 8
test edi, edi
je 0x4909de
mov eax, dword [esi + 0x640]
imul eax, dword [ebp + 8]
push 0
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x634]
add eax, dword [esi + 0x638]
push eax
push edi
call fcn.00497be2
mov eax, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [esi + 0x638]
add eax, ecx
mov edx, dword [esi + 0x63c]
cmp eax, edx
jle 0x490958
mov eax, edx
sub eax, ecx
jmp 0x49095b
mov eax, dword [ebp - 8]
push edi
push eax
push 1
push ebx
call fcn.00495739
add esp, 0x10
mov dword [ebp - 8], eax
cmp dword [esi + 0x630], 0
jne 0x49097d
push edi
call fcn.00494b54
add esp, 4
mov eax, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov dword [eax], edi
test edi, edi
je 0x4909e0
mov eax, dword [esi + 0x618]
cmp word [eax], 2
jne 0x4909fc
lea ecx, [edi*4]
call fcn.00484ed0
mov ecx, dword [esi + 0x618]
mov edx, ebx
push edi
push eax
push dword [esi + 0x61c]
mov dword [ebp - 8], eax
call fcn.00493690
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
test eax, eax
je 0x4909d0
push ebx
call fcn.00494034
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
jmp 0x4909f9
mov eax, dword [ebp - 8]
push eax
call fcn.00494034
add esp, 4
jmp 0x4909e0
xor edi, edi
mov eax, dword [esi + 0x640]
mov edx, ebx
imul eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov ecx, esi
push eax
call fcn.00490100
add esp, 4
add dword [esi + 0x638], edi
mov eax, dword [esi + 0x638]
cmp eax, dword [esi + 0x63c]
jl 0x490ba4
mov eax, dword [esi + 0x654]
test eax, 0x40000000
je 0x490a40
and eax, 0xbfffffff
dec eax
je 0x490a36
or eax, 0x40000000
mov dword [esi + 0x654], eax
jmp 0x490a40
mov dword [esi + 0x654], 0
lea ebx, [esi + 0x410]
mov dword [esi + 0x638], 0
cmp byte [ebx], 0
je 0x490b09
cmp byte [esi + 0x104], 0
lea edi, [esi + 0x104]
je 0x490a75
cmp dword [esi + 0x64c], 0
je 0x490b09
mov eax, dword [esi + 0x630]
test eax, eax
je 0x490a92
push eax
call fcn.00494b54
add esp, 4
mov dword [esi + 0x630], 0
mov eax, dword [esi + 0x658]
mov edx, esi
mov dword [esi + 0x654], eax
mov ecx, ebx
sub edx, ebx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x490aa4
lea ecx, [esi + 0x514]
sub edi, ecx
lea esp, [esp]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edi + ecx - 1], al
test al, al
jne 0x490ac0
mov byte [ebx], al
cmp dword [esi + 0x67c], 0
mov dword [esi + 0x64c], 0
jne 0x490aec
mov dword [esi + 0x67c], 0xffffffff
lea eax, [esi + 0x208]
mov edx, esi
push eax
mov ecx, esi
call fcn.00490130
mov eax, dword [ebp - 0xc]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi + 0x104], 0
je 0x490b6c
cmp dword [esi + 0x64c], 0
jne 0x490b6c
cmp dword [esi + 0x654], 0
je 0x490b6c
mov eax, dword [esi + 0x630]
test eax, eax
je 0x490b41
push eax
call fcn.00494b54
add esp, 4
mov dword [esi + 0x630], 0
lea eax, [esi + 0x30c]
mov dword [esi + 0x64c], 1
push eax
lea edx, [esi + 0x104]
mov ecx, esi
call fcn.00490130
mov eax, dword [ebp - 0xc]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x648], 0
jne 0x490ba4
cmp dword [esi + 0x67c], 0
jne 0x490b88
mov dword [esi + 0x67c], 0xffffffff
cmp dword [esi + 0x654], 0
jne 0x490ba4
cmp dword [esi + 0x678], 0
jne 0x490ba4
mov dword [esi + 0x678], 0xffffffff
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret