Function at 0x461dc0
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 0x461f01
push eax
lea edx, [ebp - 0x108]
mov ecx, 0x4d41c4
call fcn.00461bb0
add esp, 4
test eax, eax
je 0x461f01
xor edx, edx
lea ecx, [ebp - 0x100]
call fcn.004697a0
xor edx, edx
mov dword [ebp - 0x630], eax
lea ecx, [ebp - 0x108]
mov byte [ebp - 0x100], 0
call fcn.004697a0
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 0x461f01
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 0x461efa
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 0x461f14
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.0046e94e
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 0x461f56
test cl, 3
jne 0x461f3f
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 0x461f31
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 0x461f01
push eax
lea edx, [ebp - 0x414]
mov ecx, str.RESOURCE.dll
call fcn.00461bb0
add esp, 4
test eax, eax
je 0x461f01
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 0x461f01
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 0x462040
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 0x46205b
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.0046e94e
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 0x46209b
cmp dword [ebp - 0x410], ecx
jne 0x462082
mov eax, 0xc
jmp 0x462095
test cl, 3
jne 0x46208a
xor edi, dword [ecx + esi]
movzx eax, byte [ecx + esi]
add ebx, eax
mov eax, 1
add ecx, eax
cmp edx, ecx
ja 0x462073
mov eax, dword [sym.imp.PAL.dll_PalMemoryFree]
push esi
call eax
add esp, 4
cmp dword [ebp - 0x40c], ebx
jne 0x461f01
cmp dword [ebp - 0x408], edi
jne 0x461f01
mov eax, dword [ebp - 0x62c]
mov dword [0x4d3eb0], 1
cmp eax, dword [ebp - 0x628]
jne 0x461f01
mov eax, dword [ebp - 0x630]
cmp eax, dword [ebp - 0x620]
jne 0x461f01
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046e94e
mov esp, ebp
pop ebp
ret