Function at 0x4910e0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
mov eax, dword [esp + 0x28]
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push edi
mov ebp, ecx
push SysReAllocString
push eax
mov dword [esp + 0x38], ebp
mov dword [esp + 0x30], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x24], ebx
jne 0x491128
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 4
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x18]
push edi
push ecx
lea edx, [esp + 0x18]
push 4
push edx
push ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x2c], edi
call esi
test eax, eax
je 0x49128a
mov eax, dword [esp + 0x10]
cmp eax, 0x186a0
jae 0x4912a5
push 4
push 0x1000
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
je 0x4912bd
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push 0
push eax
push ecx
push edi
push ebx
call esi
test eax, eax
je 0x4912c7
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
cmp eax, ecx
jne 0x4912c7
push eax
push edi
call fcn.00491300
add esp, 8
mov ecx, ebp
call fcn.00491080
push 4
push edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x49122b
mov eax, dword [esi + edi]
mov ecx, dword [esp + 0x10]
add esi, 4
mov dword [esp + 0x20], eax
cmp esi, ecx
jae 0x491233
cmp eax, 0x18
je 0x491233
lea ebx, [esi + edi]
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x49122b
mov eax, dword [esp + 0x10]
mov ebx, dword [ebx]
add esi, 4
cmp esi, eax
jae 0x491233
lea ebp, [esi + edi]
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x49122b
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push ebp
push ebx
push edx
call fcn.00491580
mov eax, dword [esp + 0x10]
add esi, ebx
cmp esi, eax
jae 0x491233
lea eax, [esi + edi]
push 4
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x4911be
mov dword [esp + 0x14], 0x3ee
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x14]
test ebx, ebx
jne 0x49127e
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x2c]
push edx
push 0x4b5390
lea edi, [esi + 0xc]
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
mov dword [esi + 0x110], ecx
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x18
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 4
push ebx
mov esi, 0x3ee
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4912cc
mov esi, 0x3ee
test edi, edi
je 0x4912de
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 4