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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55f4d8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x5d0074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x28], 0x57dd34
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], 0
cmp ebx, 0xffffffff
jne 0x4c2d3d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4c3007
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4c2d5a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4c3007
mov dword [ebp - 0x10], 0
mov byte [ebp - 4], 1
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x10]
call fcn.004b32b0
mov edi, dword [ebp - 0x10]
test al, al
jne 0x4c2d82
mov esi, 8
jmp 0x4c2ff3
push 0
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4c2da9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x4c2ff3
mov ebx, dword [ebp + 0x10]
mov ecx, ebx
call fcn.00412410
mov eax, dword [ebp + 8]
test eax, eax
je 0x4c2fee
mov esi, dword [ebp + 0xc]
mov byte [eax + edi], 0
push str.utf_8
push dword [esi]
call fcn.0052adad
add esp, 8
test eax, eax
jne 0x4c2de2
push 0xfde9
jmp 0x4c2fe2
push str.utf_16
push dword [esi]
call fcn.0052adad
add esp, 8
test eax, eax
jne 0x4c2e94
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x18]
shr eax, 1
push eax
push edi
call fcn.004a28a0
mov byte [ebp - 4], 2
or esi, 0xffffffff
mov edx, dword [eax]
mov ecx, dword [ebx]
sub ecx, 0x10
mov dword [ebp - 0x14], ecx
lea eax, [edx - 0x10]
mov dword [ebp + 0x10], eax
cmp eax, ecx
je 0x4c2e6f
cmp dword [ecx + 0xc], 0
lea eax, [ecx + 0xc]
mov dword [ebp + 0xc], eax
jl 0x4c2e64
mov eax, dword [edx - 0x10]
cmp eax, dword [ecx]
jne 0x4c2e64
mov ecx, dword [ebp + 0x10]
call fcn.0040a1d0
mov edx, dword [ebp + 0xc]
mov ecx, esi
mov dword [ebp + 0x10], eax
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4c2e5d
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp + 0x10]
add eax, 0x10
mov dword [ebx], eax
jmp 0x4c2e6f
push dword [edx - 0xc]
mov ecx, ebx
push edx
call fcn.004126c0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x4c2fee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4c2fee
push str.ISO_8859_1
push dword [esi]
call fcn.0052adad
add esp, 8
test eax, eax
jne 0x4c2eb1
push 0x6faf
jmp 0x4c2fe2
push str.US_ASCII
push dword [esi]
call fcn.0052adad
add esp, 8
test eax, eax
jne 0x4c2fe0
mov eax, dword [ebp + 8]
mov dword [ebp + 0xc], eax
call fcn.00411fd0
mov ecx, eax
test ecx, ecx
je 0x4c303d
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp + 0x10], esi
mov byte [ebp - 4], 4
mov eax, dword [ebp + 0xc]
test eax, eax
jle 0x4c2f5e
test edi, edi
je 0x4c3047
push 0
push 0
push eax
push edi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, eax
mov dword [ebp - 0x14], edx
test edx, edx
js 0x4c3051
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x4c2f38
push edx
lea ecx, [ebp + 0x10]
call fcn.00412580
mov esi, dword [ebp + 0x10]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 0xc]
push edx
push esi
push eax
push edi
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [ebp - 0x14]
cmp eax, dword [esi - 8]
jg 0x4c3047
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov byte [ebp - 4], 5
lea edx, [esi - 0x10]
mov ecx, dword [ebx]
or eax, 0xffffffff
sub ecx, 0x10
mov dword [ebp + 0xc], edx
mov dword [ebp - 0x14], ecx
cmp edx, ecx
je 0x4c2fc8
cmp dword [ecx + 0xc], 0
lea eax, [ecx + 0xc]
mov dword [ebp - 0x18], eax
jl 0x4c2fb7
mov eax, dword [edx]
cmp eax, dword [ecx]
jne 0x4c2fb7
mov ecx, edx
call fcn.0040a1d0
mov edx, dword [ebp - 0x18]
or ecx, 0xffffffff
mov dword [ebp - 0x1c], eax
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4c2fb0
mov esi, dword [ebp - 0x14]
push esi
mov ecx, dword [esi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1c]
add eax, 0x10
mov dword [ebx], eax
jmp 0x4c2fc2
push dword [esi - 0xc]
mov ecx, ebx
push esi
call fcn.004126c0
mov edx, dword [ebp + 0xc]
or eax, 0xffffffff
mov byte [ebp - 4], 1
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4c2fee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4c2fee
push 0
mov edx, ebx
mov ecx, edi
call fcn.00492670
add esp, 4
mov ebx, dword [ebp - 0x20]
xor esi, esi
mov byte [ebp - 4], 0
push edi
call fcn.00521c5a
add esp, 4
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x28], 0x57dd34
test ebx, ebx
je 0x4c3027
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x24], 0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0x80004005
call fcn.004126a0
push 0x80070057
call fcn.004126a0
push 0x80070057
call fcn.004126a0
int3