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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x638
mov eax, dword [0x4d1008]
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 0x461fb1
push eax
lea edx, [ebp - 0x108]
mov ecx, 0x4d41c4
call fcn.00461c60
add esp, 4
test eax, eax
je 0x461fb1
xor edx, edx
lea ecx, [ebp - 0x100]
call fcn.00469850
xor edx, edx
mov dword [ebp - 0x630], eax
lea ecx, [ebp - 0x108]
mov byte [ebp - 0x100], 0
call fcn.00469850
mov dword [ebp - 0x62c], eax
lea eax, [ebp - 0x20c]
push 0x4d41c4
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 0x461fb1
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 0x461faa
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 0x461fc4
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.0046ea3e
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 0x462006
test cl, 3
jne 0x461fef
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 0x461fe1
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 0x461fb1
push eax
lea edx, [ebp - 0x414]
mov ecx, str.RESOURCE.dll
call fcn.00461c60
add esp, 4
test eax, eax
je 0x461fb1
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 0x461fb1
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 0x4620f0
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 0x46210b
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.0046ea3e
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 0x46214b
cmp dword [ebp - 0x410], ecx
jne 0x462132
mov eax, 0xc
jmp 0x462145
test cl, 3
jne 0x46213a
xor edi, dword [ecx + esi]
movzx eax, byte [ecx + esi]
add ebx, eax
mov eax, 1
add ecx, eax
cmp edx, ecx
ja 0x462123
mov eax, dword [sym.imp.PAL.dll_PalMemoryFree]
push esi
call eax
add esp, 4
cmp dword [ebp - 0x40c], ebx
jne 0x461fb1
cmp dword [ebp - 0x408], edi
jne 0x461fb1
mov eax, dword [ebp - 0x62c]
mov dword [0x4d3eb0], 1
cmp eax, dword [ebp - 0x628]
jne 0x461fb1
mov eax, dword [ebp - 0x630]
cmp eax, dword [ebp - 0x620]
jne 0x461fb1
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046ea3e
mov esp, ebp
pop ebp
ret