Function at 0x1004c8d1
Capabilities:
Get file size
Parse pe header

Disassembly:
push 0x20
mov eax, 0x1018a407
call fcn.10188e2d
mov dword [ebp - 0x18], ecx
xor ebx, ebx
mov byte [ecx + 1], bl
mov dword [ebp - 0x10], ebx
mov edi, dword [ebp + 0x10]
mov dword [ebp - 4], ebx
test edi, edi
jne 0x1004c928
push ebx
push ebx
push 3
push ebx
push 7
push SysReAllocStringLen
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push eax
lea ecx, [ebp - 0x10]
call fcn.10046acc
cmp dword [ebp - 0x10], edi
je 0x1004cd0a
cmp dword [ebp - 0x10], 0xffffffff
je 0x1004cd0a
lea eax, [ebp - 0x10]
jmp 0x1004c92a
mov eax, edi
push ebx
push ebx
push ebx
push 2
push ebx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
mov dword [ebp - 0x2c], esi
mov byte [ebp - 4], 1
test esi, esi
je 0x1004ccc8
cmp esi, 0xffffffff
je 0x1004ccc8
test edi, edi
jne 0x1004c959
lea edi, [ebp - 0x10]
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0x24], edi
cmp edi, 0xffffffff
jne 0x1004c9ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1004c981
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101c33f0]
cmp eax, 0x101c33f0
je 0x1004cd45
test byte [eax + 0x44], 1
je 0x1004cd45
push esi
push dword [eax + 0x3c]
mov edx, 0x1001db38
push dword [eax + 0x38]
push 0x44
jmp 0x1004cd3f
sub esp, 0xc
lea ecx, [ebp - 0x1c]
push 4
push esi
call fcn.10046af6
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x1c]
test esi, esi
jne 0x1004ca09
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1004c9dc
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101c33f0]
cmp eax, 0x101c33f0
je 0x1004cd45
test byte [eax + 0x44], 1
je 0x1004cd45
push esi
push dword [eax + 0x3c]
mov edx, 0x1001db38
push dword [eax + 0x38]
push 0x45
jmp 0x1004cd3f
cmp edi, 0x40
jae 0x1004ca40
mov eax, dword [0x101c33f0]
mov esi, 0x8007000b
cmp eax, 0x101c33f0
je 0x1004cd45
test byte [eax + 0x44], 1
je 0x1004cd45
push esi
push dword [eax + 0x3c]
mov edx, 0x1001db38
push dword [eax + 0x38]
push 0x46
jmp 0x1004cd3f
mov eax, dword [esi + 0x3c]
test eax, eax
js 0x1004cc9e
lea ecx, [eax + 0xf8]
cmp ecx, eax
jb 0x1004cc77
mov edx, 0x5a4d
cmp word [esi], dx
jne 0x1004cc50
cmp edi, ecx
jb 0x1004cc50
cmp dword [eax + esi], 0x4550
je 0x1004caaa
mov eax, dword [0x101c33f0]
mov esi, 0x8007000b
cmp eax, 0x101c33f0
je 0x1004cd45
test byte [eax + 0x44], 1
je 0x1004cd45
push esi
push dword [eax + 0x3c]
mov edx, 0x1001db38
push dword [eax + 0x38]
push 0x4a
jmp 0x1004cd3f
cmp byte [ebp + 0xc], 0
mov edi, dword [ebp - 0x18]
mov byte [edi + 1], 1
je 0x1004cbef
movzx ecx, word [eax + esi + 6]
mov dword [ebp - 0x20], ecx
movzx ecx, cx
mov dword [ebp - 0x28], ecx
lea ecx, [eax + 0x18]
cmp ecx, eax
jb 0x1004cc10
lea edx, [ebp - 0x14]
mov dword [ebp - 0x14], ecx
push edx
movzx edx, word [eax + esi + 0x14]
call fcn.10044c0e
mov dword [ebp - 0x18], eax
test eax, eax
jns 0x1004cb1d
mov ecx, dword [0x101c33f0]
cmp ecx, 0x101c33f0
je 0x1004cb17
test byte [ecx + 0x44], 1
je 0x1004cb17
push eax
push dword [ecx + 0x3c]
mov edx, 0x1001db38
push dword [ecx + 0x38]
push 0x4c
pop ecx
call fcn.1004a069
mov eax, dword [ebp - 0x18]
push eax
jmp 0x1004cd46
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x14]
movzx eax, ax
imul ecx, eax, 0x28
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x18], ecx
call fcn.10044c0e
mov dword [ebp - 0x20], eax
test eax, eax
jns 0x1004cb7c
mov ecx, dword [0x101c33f0]
cmp ecx, 0x101c33f0
je 0x1004cb67
test byte [ecx + 0x44], 1
je 0x1004cb67
push eax
push dword [ecx + 0x3c]
mov edx, 0x1001db38
push dword [ecx + 0x38]
push 0x4e
pop ecx
call fcn.1004a069
mov eax, dword [ebp - 0x20]
push eax
lea ecx, [ebp - 0x20]
call fcn.10044b9d
push 0x101c213c
mov eax, ecx
jmp 0x1004cd55
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x18]
jae 0x1004cbc4
mov eax, dword [0x101c33f0]
mov esi, 0x8007000b
cmp eax, 0x101c33f0
je 0x1004cbaf
test byte [eax + 0x44], 1
je 0x1004cbaf
push esi
push dword [eax + 0x3c]
mov edx, 0x1001db38
push dword [eax + 0x38]
push 0x4f
pop ecx
call fcn.1004a069
push esi
lea ecx, [ebp - 0x24]
call fcn.10044b9d
push 0x101c213c
mov eax, ecx
jmp 0x1004cd55
mov edx, dword [ebp - 0x14]
add edx, esi
mov byte [edi], bl
cmp bx, word [ebp - 0x28]
jae 0x1004cbef
movzx eax, bx
imul eax, eax, 0x28
mov ecx, dword [eax + edx + 0x24]
and ecx, 0x20000020
setne al
inc ebx
mov byte [edi], al
test ecx, 0x20000020
je 0x1004cbcb
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea ecx, [ebp - 0x2c]
call fcn.10046aaa
lea ecx, [ebp - 0x10]
call fcn.10046aaa
mov eax, edi
call fcn.10188de9
ret 0xc
mov eax, dword [0x101c33f0]
mov esi, 0x80070216
cmp eax, 0x101c33f0
je 0x1004cc3b
test byte [eax + 0x44], 1
je 0x1004cc3b
push esi
push dword [eax + 0x3c]
mov edx, 0x1001db38
push dword [eax + 0x38]
push 0x4b
pop ecx
call fcn.1004a069
push esi
lea ecx, [ebp - 0x28]
call fcn.10044b9d
push 0x101c213c
mov eax, ecx
jmp 0x1004cd55
mov eax, dword [0x101c33f0]
mov esi, 0x8007000b
cmp eax, 0x101c33f0
je 0x1004cc3b
test byte [eax + 0x44], 1
je 0x1004cc3b
push esi
push dword [eax + 0x3c]
mov edx, 0x1001db38
push dword [eax + 0x38]
push 0x49
jmp 0x1004cc35
mov eax, dword [0x101c33f0]
mov esi, 0x80070216
cmp eax, 0x101c33f0
je 0x1004cc3b
test byte [eax + 0x44], 1
je 0x1004cc3b
push esi
push dword [eax + 0x3c]
mov edx, 0x1001db38
push dword [eax + 0x38]
push 0x48
jmp 0x1004cc35
mov eax, dword [0x101c33f0]
mov esi, 0x80070216
cmp eax, 0x101c33f0
je 0x1004cc3b
test byte [eax + 0x44], 1
je 0x1004cc3b
push esi
push dword [eax + 0x3c]
mov edx, 0x1001db38
push dword [eax + 0x38]
push 0x47
jmp 0x1004cc35
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1004ccdd
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101c33f0]
cmp eax, 0x101c33f0
je 0x1004cc3b
test byte [eax + 0x44], 1
je 0x1004cc3b
push esi
push dword [eax + 0x3c]
mov edx, 0x1001db38
push dword [eax + 0x38]
push 0x43
jmp 0x1004cc35
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1004cd1f
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101c33f0]
cmp eax, 0x101c33f0
je 0x1004cd45
test byte [eax + 0x44], 1
je 0x1004cd45
push esi
push dword [eax + 0x3c]
mov edx, 0x1001db38
push dword [eax + 0x38]
push 0x42
pop ecx
call fcn.1004a069
push esi
lea ecx, [ebp - 0x18]
call fcn.10044b9d
push 0x101c213c
mov eax, ecx
push eax
call sub.msvcrt.dll__CxxThrowException
int3