Function at 0x10042d60
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084ec3
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], 0
call fcn.10021470
xor edx, edx
mov ecx, eax
test ecx, ecx
setne dl
test edx, edx
jne 0x10042db0
push 0x80004005
call fcn.10021340
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi + 0x20], eax
mov byte [ebp - 4], 1
mov eax, dword [ebp + 8]
mov dword [edi + 0x38], 0
mov esi, dword [edi + 0x20]
sub esi, 0x10
lea edx, [eax - 0x10]
mov dword [ebp - 0x10], edx
cmp edx, esi
je 0x10042e21
cmp dword [esi + 0xc], 0
jl 0x10042e12
mov edx, dword [edx]
cmp edx, dword [esi]
jne 0x10042e12
mov ecx, dword [ebp - 0x10]
call fcn.100236e0
mov dword [ebp - 0x10], eax
lea edx, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10042e0a
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x10]
add eax, 0x10
mov dword [edi + 0x20], eax
jmp 0x10042e1e
push dword [eax - 0xc]
lea ecx, [edi + 0x20]
push eax
call fcn.10023530
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov edx, 0x12019f
push 0
push 0x80
push 3
push 0
test esi, esi
mov dword [edi], 0
push 1
mov ecx, 0x120089
mov dword [edi + 4], 0
cmovne ecx, edx
mov dword [edi + 0x34], 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x10042e7e
push str.Cant_open_file
lea ecx, [ebp + 0xc]
call fcn.10043540
push 0x100ac2c0
lea eax, [ebp + 0xc]
push eax
call fcn.10070600
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [edi + 0x2c], 0
cmp dword [edi + 0x2c], 0
mov dword [edi + 0x28], eax
ja 0x10042eb3
jb 0x10042e9e
cmp eax, 0x40
jae 0x10042eb3
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0xffffffff
push str.Incorrect_PE_file__too_small_
jmp 0x10042e68
xor eax, eax
test esi, esi
push 0
push 0
setne al
push 0
lea eax, [eax*2 + 2]
push eax
push 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ecx, eax
mov dword [edi + 4], ecx
test ecx, ecx
jne 0x10042ef3
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0xffffffff
push str.Cant_create_file_mapping
jmp 0x10042e68
xor eax, eax
test esi, esi
push 0
setne al
push 0
push 0
lea eax, [eax*2 + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 0x30], eax
test eax, eax
jne 0x10042f3c
push dword [edi + 4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [edi]
mov dword [edi + 4], 0
call esi
mov dword [edi], 0xffffffff
push str.Cant_create_map_file_view
jmp 0x10042e68
mov ecx, edi
mov dword [edi + 0x34], 1
mov dword [edi + 0x38], esi
call fcn.10042f90
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10042f71
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8