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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x428
mov eax, dword [0x51a448]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
push 0x400
xor ebx, ebx
mov dword [ebp - 0x41c], ecx
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.0049ef70
xor eax, eax
mov dword [ebp - 0x418], ebx
lea edi, [ebp - 0x14]
add esp, 0xc
stosd dword es:[edi], eax
lea ecx, [ebp - 0x414]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.0048cba0
cmp byte [ebp - 0x414], bl
je 0x4183c1
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x414]
push 0x50bb8c
push eax
call esi
push str.K7NfXRlS.DSM
lea eax, [ebp - 0x414]
push eax
call esi
push ebx
push ebx
push 3
push ebx
push 3
push SysReAllocString
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4183c0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x424], eax
cmp eax, 0x60
jb 0x4183b4
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x4183b4
push ebx
lea eax, [ebp - 0x424]
push eax
push dword [ebp - 0x424]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4183a1
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x424]
or edi, 0xffffffff
add edx, esi
mov dword [ebp - 0x428], edi
cmp dword [esi], 0x4b374e57
mov dword [ebp - 0x420], edx
jne 0x4183a1
cmp dword [esi + 4], 3
jne 0x4183a1
mov eax, dword [esi + 0x50]
add eax, esi
cmp eax, edx
jae 0x418289
mov ecx, ebx
cmp ecx, dword [esi + 0x54]
jae 0x418283
cmp byte [eax], bl
je 0x418283
mov edi, ebx
add byte [edi + eax], 0xf9
inc edi
lea edx, [edi + eax]
mov dword [ebp - 0x418], edx
cmp byte [edx], bl
jne 0x418265
mov eax, edx
inc eax
inc ecx
cmp eax, dword [ebp - 0x420]
jb 0x41825a
mov dword [ebp - 0x418], ecx
mov eax, dword [ebp - 0x41c]
mov edi, dword [esi + 0x50]
add eax, 0x818
push eax
add edi, esi
call dword [sym.imp.USER32.dll_CharUpperW]
push ebx
push ebx
push 0x400
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0x41c]
push 0xffffffffffffffff
add eax, 0x818
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4182e8
mov eax, dword [ebp - 0x41c]
add eax, 0x818
push 0x400
push eax
lea eax, [ebp - 0x414]
push eax
call fcn.004cb853
add esp, 0xc
cmp edi, dword [ebp - 0x420]
jae 0x41832f
mov eax, dword [ebp - 0x418]
cmp eax, dword [esi + 0x54]
jae 0x41832f
cmp byte [edi], bl
je 0x41832f
lea edx, [ebp - 0x414]
mov ecx, edi
call fcn.004180bc
test eax, eax
jne 0x41832f
push edi
call fcn.004c8d20
inc eax
add edi, eax
mov eax, dword [ebp - 0x418]
inc eax
pop ecx
mov dword [ebp - 0x418], eax
cmp edi, dword [ebp - 0x420]
jb 0x4182f6
mov eax, dword [ebp - 0x418]
cmp eax, dword [esi + 0x54]
je 0x41833f
xor ebx, ebx
inc ebx
jmp 0x41839b
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x414]
push eax
call fcn.00499d60
test eax, eax
je 0x41839b
mov edi, dword [esi + 0x58]
mov eax, ebx
add edi, esi
mov dword [ebp - 0x41c], ebx
jmp 0x41838a
cmp eax, dword [esi + 0x5c]
jae 0x418392
push 0x10
lea eax, [ebp - 0x14]
push eax
push edi
call fcn.0049fe79
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x41c]
je 0x418392
add edi, 0x10
inc eax
mov dword [ebp - 0x41c], eax
cmp edi, dword [ebp - 0x420]
jb 0x418362
xor ecx, ecx
inc ecx
cmp eax, dword [esi + 0x5c]
cmovne ebx, ecx
mov edi, dword [ebp - 0x428]
push esi
push 0x10000
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp edi, 0xffffffff
je 0x4183c0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
xor ecx, ebp
pop ebx
call fcn.0049d307
leave
ret