Function at 0x460710
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x638
mov eax, dword [0x4d0008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov eax, ecx
lea ecx, [ebp - 0x20c]
push 0x104
push ecx
push eax
mov dword [ebp - 0x624], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push str._sdllRESOURCE.dll
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x460851
push eax
lea edx, [ebp - 0x108]
mov ecx, 0x4d3184
call fcn.00460500
add esp, 4
test eax, eax
je 0x460851
xor edx, edx
lea ecx, [ebp - 0x100]
call fcn.00467fd0
xor edx, edx
mov dword [ebp - 0x630], eax
lea ecx, [ebp - 0x108]
mov byte [ebp - 0x100], 0
call fcn.00467fd0
mov dword [ebp - 0x62c], eax
lea eax, [ebp - 0x20c]
push 0x4d3184
push eax
lea eax, [ebp - 0x310]
push str._s_s
push eax
call ebx
add esp, 0x10
lea eax, [ebp - 0x310]
push 0
push 0x80
push 3
push 0
push 1
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x460851
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push 0
push ebx
call dword [sym.imp.PAL.dll_PalMemoryAlloc]
mov esi, eax
add esp, 8
test esi, esi
je 0x46084a
push 0
lea eax, [ebp - 0x634]
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x460864
push esi
call dword [sym.imp.PAL.dll_PalMemoryFree]
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046d15f
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x628], edx
mov dword [ebp - 0x620], eax
test ebx, ebx
je 0x4608a6
test cl, 3
jne 0x46088f
xor eax, dword [ecx + esi]
mov dword [ebp - 0x620], eax
movzx eax, byte [ecx + esi]
inc ecx
add edx, eax
mov eax, dword [ebp - 0x620]
cmp ecx, ebx
jne 0x460881
mov dword [ebp - 0x628], edx
push esi
call dword [sym.imp.PAL.dll_PalMemoryFree]
add esp, 4
lea eax, [ebp - 0x518]
push 0x104
push eax
push dword [ebp - 0x624]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x518]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea eax, [ebp - 0x518]
push eax
lea eax, [ebp - 0x61c]
push str._sdllRESOURCE.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x460851
push eax
lea edx, [ebp - 0x414]
mov ecx, str.RESOURCE.dll
call fcn.00460500
add esp, 4
test eax, eax
je 0x460851
push 0
push 0x80
push 3
push 0
push 1
push connect
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x460851
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push 0
push ebx
mov dword [ebp - 0x624], ebx
call dword [sym.imp.PAL.dll_PalMemoryAlloc]
mov esi, eax
add esp, 8
test esi, esi
je 0x460990
push 0
lea eax, [ebp - 0x638]
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4609ab
mov eax, dword [sym.imp.PAL.dll_PalMemoryFree]
push esi
call eax
add esp, 4
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call eax
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046d15f
mov esp, ebp
pop ebp
ret
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call eax
mov edx, dword [ebp - 0x624]
xor ecx, ecx
xor ebx, ebx
xor edi, edi
test edx, edx
je 0x4609eb
cmp dword [ebp - 0x410], ecx
jne 0x4609d2
mov eax, 0xc
jmp 0x4609e5
test cl, 3
jne 0x4609da
xor edi, dword [ecx + esi]
movzx eax, byte [ecx + esi]
add ebx, eax
mov eax, 1
add ecx, eax
cmp edx, ecx
ja 0x4609c3
mov eax, dword [sym.imp.PAL.dll_PalMemoryFree]
push esi
call eax
add esp, 4
cmp dword [ebp - 0x40c], ebx
jne 0x460851
cmp dword [ebp - 0x408], edi
jne 0x460851
mov eax, dword [ebp - 0x62c]
mov dword [0x4d2e70], 1
cmp eax, dword [ebp - 0x628]
jne 0x460851
mov eax, dword [ebp - 0x630]
cmp eax, dword [ebp - 0x620]
jne 0x460851
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046d15f
mov esp, ebp
pop ebp
ret