Function at 0x496f20
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 0x14]
sub esp, 0x12c
push ebx
push ebp
push esi
push edi
xor edi, edi
mov ebp, ecx
cmp eax, edi
jl 0x49739f
mov esi, dword [esp + 0x144]
lea eax, [ebp + 0x18]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x496f6c
test cl, cl
je 0x496f68
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x496f6c
add eax, 2
add esi, 2
test cl, cl
jne 0x496f44
xor eax, eax
jmp 0x496f71
sbb eax, eax
sbb eax, 0xffffffff
mov esi, eax
cmp esi, edi
jne 0x496fa3
mov ecx, dword [0x943a60]
mov edx, dword [ebp + 0x68]
xor eax, eax
cmp edx, ecx
je 0x496f8e
mov dword [ebp + 0x68], ecx
mov eax, 1
cmp eax, edi
mov esi, eax
jne 0x496fa3
mov ecx, ebp
call fcn.0047ff00
test eax, eax
je 0x497118
mov ecx, ebp
call fcn.00496670
mov eax, dword [esp + 0x140]
push 2
push edi
push eax
call dword [sym.imp.MSVCRT.dll__lseek]
mov ebx, eax
add esp, 0xc
cmp ebx, edi
jle 0x49739f
cmp esi, edi
je 0x49701b
mov ecx, dword [esp + 0x154]
mov dword [ebp + 8], edi
mov edx, ecx
mov dword [ebp + 4], edi
and edx, 1
mov dword [ebp + 0x64], edi
test ch, 4
lea eax, [edx + edx]
mov dword [ebp + 0x60], edi
mov dword [ebp], eax
je 0x496ff4
or al, 8
mov dword [ebp], eax
mov edi, dword [esp + 0x144]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
lea edi, [ebp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor edi, edi
cmp dword [ebp + 0x60], edi
jg 0x497032
mov ecx, dword [esp + 0x140]
push ecx
mov ecx, ebp
call fcn.00496bb0
mov dword [ebp + 0x60], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x60]
mov edi, eax
add edi, edx
sub ebx, edi
mov dword [esp + 0x10], edi
mov esi, ebx
mov dword [esp + 0x38], esi
lea ebx, [eax + esi]
mov eax, dword [ebp + 0x14]
cmp ebx, eax
mov dword [esp + 0x30], ebx
jle 0x4970bc
lea eax, [ebx + 0x3ff]
cdq
and edx, 0x3ff
add eax, edx
mov ebx, eax
sar ebx, 0xa
shl ebx, 0xb
push ebx
call fcn.00478e60
mov edx, dword [ebp + 0x10]
add esp, 4
test edx, edx
mov dword [esp + 0x34], eax
je 0x4970b2
mov ecx, dword [ebp + 8]
mov esi, edx
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
push eax
push ecx
call fcn.00478eb0
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x3c]
add esp, 8
mov dword [ebp + 0x14], ebx
mov ebx, dword [esp + 0x30]
mov dword [ebp + 0x10], eax
test esi, esi
jle 0x497113
push 0
push edi
mov edi, dword [esp + 0x148]
push edi
call dword [sym.imp.MSVCRT.dll__lseek]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
add edx, eax
push esi
push edx
push edi
call dword [sym.imp.MSVCRT.dll__read]
mov eax, dword [esp + 0x170]
mov edi, dword [esp + 0x16c]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
add esp, 0x18
add ecx, edx
push eax
push edi
push esi
push ecx
mov ecx, ebp
call fcn.004968d0
mov edx, dword [ebp + 8]
push edi
push esi
push edx
mov ecx, ebp
call fcn.00496d30
mov dword [ebp + 8], ebx
xor edi, edi
mov eax, dword [esp + 0x150]
mov ecx, dword [ebp + 4]
cmp eax, ecx
jge 0x49739f
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], edi
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x148]
xor ecx, ecx
mov edx, edi
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov eax, dword [ebp]
mov ecx, dword [ebp + 0x58]
mov edx, dword [esp + 0x150]
test al, 1
je 0x4972a8
mov ebx, dword [ecx + edx*4]
mov edx, dword [ebp + 0x10]
add ebx, edx
xor esi, esi
test al, 0xa
je 0x4971de
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x3d]
mov byte [esp + 0x3c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 8]
cdq
sub eax, edx
sar eax, 1
test eax, eax
jle 0x4971b3
mov ecx, ebx
mov dx, word [ecx]
cmp dx, 9
je 0x4971b3
cmp dx, 0xa
je 0x4971b3
mov byte [esp + esi + 0x3c], dl
inc esi
add ecx, 2
cmp esi, eax
jl 0x497198
lea eax, [esp + 0x20]
lea ecx, [esp + 0x24]
push eax
lea edx, [esp + 0x2c]
push ecx
push edx
lea eax, [esp + 0x48]
push str._d__d__d
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x14
test eax, eax
jle 0x49739f
inc esi
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0xbd]
mov byte [esp + 0xbc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 8]
cdq
sub eax, edx
mov edi, eax
sar edi, 1
cmp esi, edi
jge 0x49722b
lea edx, [esp + 0xbc]
lea ecx, [ebx + esi*2]
mov ax, word [ecx]
cmp ax, 9
je 0x49722b
cmp ax, 0xa
je 0x49722b
mov byte [edx], al
inc edx
inc esi
add ecx, 2
cmp esi, edi
jl 0x497211
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x24]
push eax
push ecx
lea edx, [esp + 0xcc]
push str._d:_d:_d:_d
push edx
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x18
test eax, eax
jle 0x49739f
mov ecx, dword [esp + 0x148]
lea eax, [esp + 0x14]
mov edx, 7
mov di, word [eax]
add eax, 4
mov word [ecx], di
add ecx, 2
dec edx
jne 0x49726d
push ebx
inc esi
call fcn.00479be0
sub eax, esi
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
jle 0x49738e
mov edi, dword [esp + 0x14c]
lea ecx, [eax + eax]
lea esi, [ebx + esi*2]
mov edx, ecx
jmp 0x497382
mov esi, dword [ecx + edx*4]
mov edx, dword [ebp + 0x10]
mov ebx, dword [sym.imp.MSVCRT.dll_sscanf]
mov ebp, dword [sym.imp.MSVCRT.dll_strchr]
add esi, edx
test al, 0xa
je 0x4972fa
lea eax, [esp + 0x20]
lea ecx, [esp + 0x24]
push eax
lea edx, [esp + 0x2c]
push ecx
push edx
push str._d__d__d_
push esi
call ebx
add esp, 0x14
test eax, eax
jle 0x49739f
push 0x2c
push esi
call ebp
mov esi, eax
add esp, 8
test esi, esi
je 0x49739f
cmp byte [esi], 0
je 0x4972fa
inc esi
test esi, esi
je 0x49739f
cmp byte [esi], 0
je 0x49739f
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x1c]
push ecx
lea eax, [esp + 0x24]
push edx
push eax
push str._d:_d:_d:_d_
push esi
call ebx
add esp, 0x18
test eax, eax
jle 0x49739f
mov ecx, edi
lea eax, [esp + 0x14]
mov edx, 7
mov di, word [eax]
add eax, 4
mov word [ecx], di
add ecx, 2
dec edx
jne 0x497339
push 0x2c
push esi
call ebp
mov edx, eax
add esp, 8
test edx, edx
je 0x49738e
cmp byte [edx], 0
je 0x49738e
inc edx
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, edx
mov dword [esp + 0x10], ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x14c]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x12c
ret 0x1c
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x12c
ret 0x1c