Function at 0x1004d980
Capabilities:
Read file on windows

Disassembly:
push 0x650
mov eax, 0x10089f4e
call fcn.10063057
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x20]
push dword [ebp + 0x18]
mov dword [ebp - 0x630], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x650], eax
mov eax, dword [ebp + 0x1c]
xor esi, esi
mov dword [ebp - 0x640], ecx
mov dword [ebp - 0x62c], eax
mov dword [ebp - 0x64c], ebx
mov dword [ebp - 0x634], esi
mov byte [ebp - 0x648], 0
mov dword [ebp - 0x63c], esi
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x634], eax
cmp eax, esi
jne 0x1004da29
push 0x1010
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x640], eax
mov dword [ebp - 4], esi
cmp eax, esi
je 0x1004da0c
push 0x10006c68
push esi
push 4
push eax
call fcn.10037a50
add esp, 0x10
jmp 0x1004da0e
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x62c], eax
push 0x1008bdb8
lea eax, [ebp - 0x62c]
push eax
call fcn.1006330f
lea eax, [ebp - 0x634]
push eax
lea ecx, [ebp - 0x65c]
call fcn.100379f0
mov edi, dword [ebp + 0x14]
push esi
push esi
shl edi, 0xb
push edi
push ebx
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1004daaf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov dword [ebp - 0x630], eax
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x640], eax
mov byte [ebp - 4], 2
cmp eax, esi
je 0x1004daa4
push dword [ebp - 0x630]
push dword [ebp - 0x630]
push esi
push esi
push edi
push ebx
push 0x10006bf0
push dword [ebp - 0x630]
push 5
push eax
call fcn.10037a50
add esp, 0x28
jmp 0x1004daa6
xor eax, eax
mov byte [ebp - 4], 1
jmp 0x1004da12
mov edi, dword [ebp + 0x18]
push edi
push esi
push dword [ebp - 0x634]
call fcn.100620c0
add esp, 0xc
push esi
lea eax, [ebp - 0x63c]
push eax
push edi
push dword [ebp - 0x634]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1004db24
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov edi, eax
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x640], eax
mov byte [ebp - 4], 3
cmp eax, esi
je 0x1004daa4
push edi
push edi
push esi
lea ecx, [ebp - 0x63c]
push ecx
push dword [ebp + 0x18]
push dword [ebp - 0x634]
push ebx
push 0x10006b70
push edi
push 5
push eax
call fcn.10037a50
add esp, 0x2c
jmp 0x1004daa6
cmp dword [ebp - 0x63c], edi
je 0x1004db82
push 0x1010
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x62c], eax
mov byte [ebp - 4], 4
cmp eax, esi
je 0x1004daa4
mov eax, 0x3e4
push eax
push eax
push edi
push dword [ebp - 0x63c]
lea ecx, [ebp - 0x63c]
push esi
push ecx
push edi
push dword [ebp - 0x634]
push ebx
push 0x10006ae0
push eax
push 5
push dword [ebp - 0x62c]
call fcn.10037a50
add esp, 0x34
jmp 0x1004daa6
mov eax, dword [ebp - 0x634]
movzx ecx, byte [eax]
movzx edx, byte [ecx + eax]
add ecx, edx
lea ebx, [ecx + eax]
cmp byte [ebx], 0
mov dword [ebp - 0x644], ecx
je 0x1004dba3
cmp ecx, edi
jb 0x1004dbbc
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x65c]
call fcn.10037a13
call fcn.100630e9
ret 0x1c
xor esi, esi
push 0x208
lea eax, [ebp - 0x420]
push esi
push eax
call fcn.100620c0
push 0x104
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.100620c0
add esp, 0x18
cmp byte [ebp + 0xc], 0
jne 0x1004dc03
movzx eax, byte [ebx + 0x20]
push eax
lea eax, [ebx + 0x21]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.10062580
add esp, 0xc
jmp 0x1004dc75
mov al, byte [ebx + 0x20]
movzx edi, al
shr edi, 1
lea ecx, [ebx + 0x21]
push edi
mov byte [ebp - 0x648], al
push ecx
lea eax, [ebp - 0x420]
push eax
call fcn.10063154
add esp, 0xc
xor eax, eax
movzx ecx, word [ebp + eax - 0x420]
mov word [ebp + eax - 0x628], cx
inc eax
inc eax
cmp cx, si
jne 0x1004dc27
push edi
lea eax, [ebp - 0x420]
push eax
call fcn.1003770d
push esi
push 0x10006958
push 0x104
lea eax, [ebp - 0x114]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
push esi
push esi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x1004dddd
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1004dc7e
sub eax, edx
cmp al, 2
jbe 0x1004dc9c
movzx eax, al
lea eax, [ebp + eax - 0x116]
cmp byte [eax], 0x3b
jne 0x1004dc9c
mov byte [eax], cl
lea eax, [ebp - 0x114]
push eax
push dword [ebp - 0x650]
lea eax, [ebp - 0x218]
push 0x10006950
push eax
call fcn.10062ada
mov cl, byte [ebx + 0x19]
mov eax, dword [ebx + 0xa]
add esp, 0x10
xor dl, dl
test cl, 2
je 0x1004dccd
add dl, 0x10
test cl, 1
je 0x1004dcd5
or dl, 2
test dl, 0x10
jne 0x1004dd24
mov ecx, eax
or ecx, esi
jne 0x1004dd24
cmp dword [ebx + 2], esi
jne 0x1004dd24
push dword [ebp - 0x62c]
mov ecx, dword [ebp - 0x630]
mov ecx, dword [ecx]
push esi
push eax
push 1
push ecx
push ecx
mov edi, esp
movzx eax, dl
push eax
push dword [ebp - 0x648]
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x218]
push eax
mov dword [ebp - 0x638], ecx
mov eax, ecx
jmp 0x1004dd62
push dword [ebp - 0x62c]
mov ecx, dword [ebp - 0x630]
mov ecx, dword [ecx]
push esi
push eax
push dword [ebx + 2]
movzx eax, dl
push ecx
push ecx
mov edi, esp
push eax
push dword [ebp - 0x648]
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x218]
push eax
mov dword [ebp - 0x638], ecx
mov eax, ecx
mov ecx, dword [ebp - 0x630]
lea esi, [ebx + 0x12]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
call dword [eax + 0x24]
test byte [ebx + 0x19], 2
je 0x1004dda4
test eax, eax
je 0x1004dda4
push dword [ebp - 0x64c]
mov ecx, dword [ebp - 0x640]
push eax
push dword [ebx + 0xa]
lea eax, [ebp - 0x218]
push dword [ebx + 2]
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x630]
call fcn.1004d980
movzx ecx, byte [ebx]
mov eax, dword [ebp - 0x644]
add eax, ecx
mov ecx, dword [ebp - 0x634]
jmp 0x1004ddc1
cmp eax, dword [ebp + 0x18]
jae 0x1004dba3
inc eax
lea ebx, [eax + ecx]
cmp byte [ebx], 0
mov dword [ebp - 0x644], eax
je 0x1004ddb7
cmp eax, dword [ebp + 0x18]
jb 0x1004dbba
jmp 0x1004dba3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1010
mov edi, eax
call fcn.10062b5c
pop ecx
mov dword [ebp - 0x640], eax
mov byte [ebp - 4], 5
cmp eax, esi
je 0x1004de12
push edi
push 0x10006a78
push edi
push 5
push eax
call fcn.10037a50
add esp, 0x14
jmp 0x1004de14
xor eax, eax
mov dword [ebp - 0x638], eax
mov byte [ebp - 4], 1
push 0x1008bdb8
lea eax, [ebp - 0x638]
jmp 0x1004da23