Function at 0x4973b0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 0x14]
sub esp, 0xcb8
test eax, eax
push ebx
push ebp
push esi
push edi
mov ebp, ecx
jl 0x497afe
mov edi, dword [esp + 0xcd0]
lea ebx, [ebp + 0x18]
mov esi, edi
mov eax, ebx
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4973fa
test cl, cl
je 0x4973f6
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4973fa
add eax, 2
add esi, 2
test cl, cl
jne 0x4973d6
xor eax, eax
jmp 0x4973ff
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x497412
mov ecx, ebp
call fcn.0047ff00
test eax, eax
je 0x497798
mov ecx, dword [esp + 0xce0]
xor eax, eax
mov dword [ebp + 8], eax
mov dword [ebp + 4], eax
mov eax, ecx
and eax, 1
add eax, eax
test ch, 4
mov dword [ebp], eax
je 0x497435
or al, 8
mov dword [ebp], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 2
mov edx, ecx
mov esi, edi
mov edi, ebx
mov ebx, dword [esp + 0xcd0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x1c], eax
call dword [sym.imp.MSVCRT.dll__lseek]
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jle 0x497afe
push 0
push 0
push ebx
call dword [sym.imp.MSVCRT.dll__lseek]
lea eax, [esp + 0x20]
push 2
push eax
push ebx
mov dword [esp + 0x2c], 0
call dword [sym.imp.MSVCRT.dll__read]
mov eax, dword [esp + 0x2c]
add esp, 0x18
cmp eax, 0xfeff
jne 0x49759d
mov ecx, dword [ebp]
xor esi, esi
or ecx, 1
xor eax, eax
mov dword [ebp], ecx
mov ecx, 0x7f
lea edi, [esp + 0xca]
mov word [esp + 0xc8], si
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc8]
push 0x200
push ecx
push ebx
stosw word es:[edi], ax
call dword [sym.imp.MSVCRT.dll__read]
mov al, byte [ebp]
add esp, 0xc
test al, 2
je 0x497548
xor edx, edx
mov byte [esp + 0x1c], 0
mov dword [esp + 0x1d], edx
lea ecx, [esp + 0xc8]
mov dword [esp + 0x21], edx
mov dword [esp + 0x25], edx
mov word [esp + 0x29], dx
mov byte [esp + 0x2b], dl
lea edx, [esp + 0x1c]
mov ax, word [ecx]
inc esi
add ecx, 2
cmp ax, 0xa
je 0x497537
cmp ax, 9
je 0x49752e
cmp ax, 0xd
je 0x49752e
mov byte [edx], al
inc edx
cmp esi, 0x100
jl 0x497513
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [ebp + 4], eax
cmp esi, 0x100
mov edx, esi
jge 0x497588
lea ecx, [esp + esi*2 + 0xc8]
mov eax, ecx
mov di, word [eax]
inc esi
add eax, 2
cmp di, 0xa
je 0x497570
cmp esi, 0x100
jl 0x49755b
cmp edx, esi
jge 0x497588
mov eax, esi
sub eax, edx
cmp word [ecx], 9
jne 0x497582
inc dword [esp + 0x10]
add ecx, 2
dec eax
jne 0x497578
mov ecx, dword [esp + 0x18]
lea eax, [esi + esi + 2]
sub ecx, eax
push 0
mov dword [ebp + 8], ecx
push eax
jmp 0x49767a
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0xc9]
mov byte [esp + 0xc8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
push 0
push ebx
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll__lseek]
lea ecx, [esp + 0xd4]
push 0x100
push ecx
push ebx
call dword [sym.imp.MSVCRT.dll__read]
mov al, byte [ebp]
add esp, 0x18
xor esi, esi
test al, 2
je 0x497633
xor edx, edx
mov byte [esp + 0x1c], 0
mov dword [esp + 0x1d], edx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x21], edx
mov dword [esp + 0x25], edx
mov word [esp + 0x29], dx
mov byte [esp + 0x2b], dl
mov al, byte [esp + esi + 0xc8]
inc esi
cmp al, 0xa
je 0x497622
cmp al, 0x2c
je 0x497619
cmp al, 0xd
je 0x497619
mov byte [ecx], al
inc ecx
cmp esi, 0x100
jl 0x497603
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [ebp + 4], eax
cmp esi, 0x100
mov eax, esi
jge 0x49766e
mov cl, byte [esp + esi + 0xc8]
inc esi
cmp cl, 0xa
je 0x497652
cmp esi, 0x100
jl 0x49763d
cmp eax, esi
jge 0x49766e
mov ecx, dword [esp + 0x10]
cmp byte [esp + eax + 0xc8], 0x2c
jne 0x497665
inc ecx
inc eax
cmp eax, esi
jl 0x49765a
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x18]
push 0
sub eax, esi
push esi
mov dword [ebp + 8], eax
push ebx
call dword [sym.imp.MSVCRT.dll__lseek]
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov ecx, ebp
push edx
call fcn.00496650
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
cmp ecx, eax
jle 0x4976ca
push eax
mov eax, dword [ebp + 0x10]
push eax
call fcn.00478eb0
mov eax, dword [ebp + 8]
add eax, 0x3ff
cdq
and edx, 0x3ff
add eax, edx
sar eax, 0xa
shl eax, 0xa
push eax
mov dword [ebp + 0x14], eax
call fcn.00478e60
add esp, 0xc
mov dword [ebp + 0x10], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
push ecx
push edx
push ebx
call dword [sym.imp.MSVCRT.dll__read]
mov eax, dword [esp + 0xcf0]
mov esi, dword [esp + 0xcec]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
add esp, 0xc
push eax
push esi
push ecx
push edx
mov ecx, ebp
call fcn.004968d0
mov eax, dword [ebp + 4]
test eax, eax
jle 0x49770e
test dword [0x67a960], esi
je 0x497798
mov al, byte [ebp]
xor edx, edx
test al, 1
mov dword [ebp + 4], edx
je 0x497762
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
cdq
sub eax, edx
xor esi, esi
sar eax, 1
xor edi, edi
test eax, eax
jle 0x497798
mov edx, ecx
cmp word [edx], 0xa
jne 0x497738
inc dword [ebp + 4]
mov cx, word [edx]
cmp cx, 9
je 0x497747
cmp cx, 0xa
jne 0x497758
mov ecx, esi
sub ecx, edi
mov edi, dword [ebp + 0xc]
cmp ecx, edi
jle 0x497755
mov dword [ebp + 0xc], ecx
lea edi, [esi + 1]
inc esi
add edx, 2
cmp esi, eax
jl 0x49772f
jmp 0x497798
mov edi, dword [ebp + 8]
xor ecx, ecx
test edi, edi
jle 0x497798
mov esi, dword [ebp + 0x10]
cmp byte [esi + ecx], 0xa
jne 0x497777
inc dword [ebp + 4]
mov al, byte [esi + ecx]
cmp al, 0x2c
je 0x497782
cmp al, 0xa
jne 0x497793
mov eax, ecx
sub eax, edx
mov edx, dword [ebp + 0xc]
cmp eax, edx
jle 0x497790
mov dword [ebp + 0xc], eax
lea edx, [ecx + 1]
inc ecx
cmp ecx, edi
jl 0x49776e
xor edx, edx
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x30]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x10], edx
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0xcd4]
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov al, byte [ebp]
test al, 1
je 0x49797a
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
cdq
sub eax, edx
xor esi, esi
mov ebx, eax
xor edi, edi
sar ebx, 1
test ebx, ebx
mov dword [esp + 0x14], ecx
jle 0x4977fc
mov eax, ecx
cmp edi, dword [esp + 0xcdc]
jge 0x4977fc
cmp word [eax], 0xa
jne 0x4977f4
inc edi
inc esi
add eax, 2
cmp esi, ebx
jl 0x4977e4
cmp esi, ebx
jge 0x497afe
cmp word [ecx + esi*2], 0xa
lea edx, [ecx + esi*2]
mov edi, esi
mov dword [esp + 0x18], edi
je 0x497824
mov eax, edx
add eax, 2
inc edi
cmp word [eax], 0xa
jne 0x497816
mov dword [esp + 0x18], edi
sub edi, esi
cmp edi, 8
jl 0x497afe
test byte [ebp], 0xa
je 0x497895
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x49]
mov byte [esp + 0x48], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea ecx, [esp + 0x48]
mov eax, edx
mov dx, word [eax]
cmp dx, 9
je 0x49786a
cmp dx, 0xa
je 0x49786a
mov byte [ecx], dl
inc ecx
inc esi
add eax, 2
cmp esi, ebx
jl 0x497850
lea eax, [esp + 0x38]
lea ecx, [esp + 0x3c]
push eax
lea edx, [esp + 0x44]
push ecx
push edx
lea eax, [esp + 0x54]
push str._d__d__d
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x14
test eax, eax
jle 0x497afe
inc esi
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0xc9]
mov byte [esp + 0xc8], 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 0x4978e6
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0xc8]
lea ecx, [ecx + esi*2]
mov ax, word [ecx]
cmp ax, 9
je 0x4978e6
cmp ax, 0xa
je 0x4978e6
mov byte [edx], al
inc edx
inc esi
add ecx, 2
cmp esi, edi
jl 0x4978cc
lea ecx, [esp + 0x44]
lea edx, [esp + 0x2c]
push ecx
lea eax, [esp + 0x34]
push edx
lea ecx, [esp + 0x3c]
push eax
push ecx
lea edx, [esp + 0xd8]
push str._d:_d:_d:_d
push edx
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x18
test eax, eax
jle 0x497afe
mov ecx, dword [esp + 0xcd4]
lea eax, [esp + 0x2c]
mov edx, 7
mov di, word [eax]
add eax, 4
mov word [ecx], di
add ecx, 2
dec edx
jne 0x497928
mov eax, dword [esp + 0x18]
inc esi
sub eax, esi
test eax, eax
mov dword [esp + 0x10], eax
jle 0x497aed
mov edi, dword [esp + 0xcd8]
lea ecx, [eax + eax]
mov eax, dword [esp + 0x14]
mov edx, ecx
shr ecx, 2
lea esi, [eax + esi*2]
mov eax, dword [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xcb8
ret 0x1c
mov ecx, 0x27f
xor eax, eax
lea edi, [esp + 0x2c9]
mov byte [esp + 0x2c8], 0
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
cmp ecx, edx
jle 0x4979b8
mov esi, dword [esp + 0xcdc]
cmp edx, esi
jge 0x4979b8
mov edi, dword [ebp + 0x10]
cmp byte [edi + eax], 0xa
jne 0x4979b3
inc edx
inc eax
cmp eax, ecx
jl 0x4979a5
cmp eax, ecx
jge 0x497afe
mov edx, dword [ebp + 0x10]
mov ebx, dword [sym.imp.MSVCRT.dll_sscanf]
lea ecx, [esp + 0x2c8]
add edx, eax
push ecx
push 0x587220
push edx
call ebx
lea edi, [esp + 0x2d4]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 9
jb 0x497afe
mov al, byte [ebp]
mov edi, dword [sym.imp.MSVCRT.dll_strchr]
test al, 0xa
lea esi, [esp + 0x2c8]
je 0x497a54
lea eax, [esp + 0x38]
lea ecx, [esp + 0x3c]
push eax
lea edx, [esp + 0x44]
push ecx
push edx
lea eax, [esp + 0x2d4]
push str._d__d__d_
push eax
call ebx
add esp, 0x14
test eax, eax
jle 0x497afe
lea ecx, [esp + 0x2c8]
push 0x2c
push ecx
call edi
mov esi, eax
add esp, 8
test esi, esi
je 0x497afe
cmp byte [esi], 0
je 0x497a54
inc esi
test esi, esi
je 0x497afe
cmp byte [esi], 0
je 0x497afe
lea edx, [esp + 0x44]
lea eax, [esp + 0x2c]
push edx
lea ecx, [esp + 0x34]
push eax
lea edx, [esp + 0x3c]
push ecx
push edx
push str._d:_d:_d:_d_
push esi
call ebx
add esp, 0x18
test eax, eax
jle 0x497afe
mov ecx, dword [esp + 0xcd4]
lea eax, [esp + 0x2c]
mov edx, 7
mov bx, word [eax]
add eax, 4
mov word [ecx], bx
add ecx, 2
dec edx
jne 0x497a98
push 0x2c
push esi
call edi
mov edx, eax
add esp, 8
test edx, edx
je 0x497aed
cmp byte [edx], 0
je 0x497aed
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 eax, ecx
mov esi, edi
mov edi, dword [esp + 0xcd8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
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, 0xcb8
ret 0x1c
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0xcb8
ret 0x1c