Function at 0x4c3f05
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x696956
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x816078]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x30], eax
mov edi, ecx
mov dword [ebp - 0x40], edi
and dword [ebp - 0x18], 0
xor ecx, ecx
and dword [ebp - 0x3c], ecx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], cx
movzx ebx, dx
test eax, eax
jne 0x4c3f62
mov ebx, 0x80004003
jmp 0x4c4127
cmp ebx, 4
jae 0x4c4122
mov eax, edx
mov ecx, 0x7f0000
and eax, 0xffff0000
or eax, ecx
cmp eax, ecx
jne 0x4c4122
mov esi, edx
mov ecx, edx
and esi, 0x10000
mov eax, edx
neg esi
push dword [ebp - 0x30]
sbb esi, esi
shr ecx, 0x12
not ecx
and esi, 0x4000100
and ecx, 1
add esi, 0x2000
mov edx, ecx
or edx, 4
and eax, 0x200000
mov eax, dword [ebp + 8]
cmove edx, ecx
mov ecx, edx
or ecx, 2
and eax, 0x400000
mov eax, esi
cmove ecx, edx
or eax, 0x40000000
cmp ebx, 2
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x28]
cmove eax, esi
mov dword [ebp - 0x2c], eax
call fcn.0040d510
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
mov edx, dword [ebx*8 + 0x6fe5ac]
cmovae ecx, dword [ebp - 0x28]
push ecx
push ecx
push dword [ebp - 0x2c]
push dword [ebx*8 + 0x6fe5b0]
push 0
push dword [ebp - 0x38]
call fcn.004c9d75
mov esi, eax
cmp esi, 0xffffffff
jne 0x4c407e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x4c4058
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4c4058
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
mov edx, dword [ebx*8 + 0x6fe5ac]
cmovae ecx, dword [ebp - 0x28]
or eax, 2
push ecx
push ecx
push dword [ebp - 0x2c]
push dword [ebx*8 + 0x6fe5b0]
push 0
push eax
call fcn.004c9d75
mov esi, eax
mov dword [ebp - 0x3c], 1
cmp esi, 0xffffffff
jne 0x4c407e
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
jne 0x4c4114
mov ebx, 0x8000ffff
jmp 0x4c4127
lea eax, [ebp - 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x4c40a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
jne 0x4c4114
cmp dword [ebp - 0x30], 0
jg 0x4c40ba
jl 0x4c40b3
cmp dword [ebp - 0x34], 0
jae 0x4c40ba
mov ebx, 0x8000ffff
jmp 0x4c4114
mov edx, dword [ebp + 8]
xor eax, eax
xor ebx, ebx
test dx, dx
setne al
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 0x2c]
shr eax, 0x1e
mov dword [edi + 0x1c], eax
mov eax, dword [ebp - 0x3c]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x34]
mov dword [edi + 0x40], eax
mov eax, dword [ebp - 0x30]
mov dword [edi + 0x44], eax
mov eax, dword [edi + 0x14]
mov dword [edi + 0x14], esi
mov esi, eax
test edx, 0x20000
jne 0x4c4108
push ebx
add edi, 0x24
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionEx]
mov byte [edi + 0x18], 1
mov edi, dword [ebp - 0x40]
lea eax, [ebp - 0x28]
push eax
lea ecx, [edi + 0x48]
call fcn.0040d3a8
cmp esi, 0xffffffff
je 0x4c4127
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4c4127
mov ebx, 0x80070057
lea ecx, [ebp - 0x28]
call fcn.0040d475
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0064c681
mov esp, ebp
pop ebp
ret 8