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

Disassembly:
push 0x20
mov eax, 0x10164af4
call fcn.10163eac
mov dword [ebp - 0x20], ecx
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 7
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x2c], esi
mov dword [ebp - 4], ebx
test esi, esi
je 0x10042708
cmp esi, 0xffffffff
je 0x10042708
push ebx
push ebx
push ebx
push 2
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
mov dword [ebp - 0x28], edi
mov byte [ebp - 4], 1
test edi, edi
je 0x100426c6
cmp edi, 0xffffffff
je 0x100426c6
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x10042755
sub esp, 0xc
lea ecx, [ebp - 0x18]
push 4
push edi
call fcn.1003fe80
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x18]
test esi, esi
jne 0x10042438
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x100423fd
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101923c0]
cmp eax, 0x101923c0
je 0x10042423
test byte [eax + 0x44], 1
je 0x10042423
push esi
push dword [eax + 0x3c]
mov edx, 0x1001938c
push dword [eax + 0x38]
push 0x3d
pop ecx
call fcn.100401e4
push esi
lea ecx, [ebp - 0x14]
call fcn.1003f8d8
push 0x10191580
mov eax, ecx
jmp 0x100427a0
mov edi, dword [ebp - 0x14]
cmp edi, 0x40
jae 0x10042467
mov eax, dword [0x101923c0]
mov esi, 0x8007000b
cmp eax, 0x101923c0
je 0x10042423
test byte [eax + 0x44], 1
je 0x10042423
push esi
push dword [eax + 0x3c]
mov edx, 0x1001938c
push dword [eax + 0x38]
push 0x3e
jmp 0x1004241d
mov eax, dword [esi + 0x3c]
test eax, eax
jns 0x10042495
mov eax, dword [0x101923c0]
mov esi, 0x80070216
cmp eax, 0x101923c0
je 0x10042423
test byte [eax + 0x44], 1
je 0x10042423
push esi
push dword [eax + 0x3c]
mov edx, 0x1001938c
push dword [eax + 0x38]
push 0x3f
jmp 0x1004241d
lea ecx, [eax + 0xf8]
cmp ecx, eax
jb 0x1004269f
mov edx, 0x5a4d
cmp word [esi], dx
jne 0x10042678
cmp edi, ecx
jb 0x10042678
cmp dword [eax + esi], 0x4550
je 0x100424f4
mov eax, dword [0x101923c0]
mov esi, 0x8007000b
cmp eax, 0x101923c0
je 0x10042423
test byte [eax + 0x44], 1
je 0x10042423
push esi
push dword [eax + 0x3c]
mov edx, 0x1001938c
push dword [eax + 0x38]
push 0x42
jmp 0x1004241d
movzx ecx, word [eax + esi + 6]
mov dword [ebp - 0x1c], ecx
movzx ecx, cx
mov dword [ebp - 0x24], ecx
lea ecx, [eax + 0x18]
cmp ecx, eax
jb 0x10042638
lea edx, [ebp - 0x10]
mov dword [ebp - 0x10], ecx
push edx
movzx edx, word [eax + esi + 0x14]
call fcn.1003f931
mov dword [ebp - 0x14], eax
test eax, eax
jns 0x10042556
mov ecx, dword [0x101923c0]
cmp ecx, 0x101923c0
je 0x10042550
test byte [ecx + 0x44], 1
je 0x10042550
push eax
push dword [ecx + 0x3c]
mov edx, 0x1001938c
push dword [ecx + 0x38]
push 0x44
pop ecx
call fcn.100401e4
mov eax, dword [ebp - 0x14]
push eax
jmp 0x10042424
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
movzx eax, ax
imul ecx, eax, 0x28
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 0x14], ecx
call fcn.1003f931
mov dword [ebp - 0x1c], eax
test eax, eax
jns 0x100425b5
mov ecx, dword [0x101923c0]
cmp ecx, 0x101923c0
je 0x100425a0
test byte [ecx + 0x44], 1
je 0x100425a0
push eax
push dword [ecx + 0x3c]
mov edx, 0x1001938c
push dword [ecx + 0x38]
push 0x46
pop ecx
call fcn.100401e4
mov eax, dword [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x1c]
call fcn.1003f8d8
push 0x10191580
mov eax, ecx
jmp 0x100427a0
cmp edi, dword [ebp - 0x14]
jae 0x100425e8
mov eax, dword [0x101923c0]
mov esi, 0x8007000b
cmp eax, 0x101923c0
je 0x100425e5
test byte [eax + 0x44], 1
je 0x100425e5
push esi
push dword [eax + 0x3c]
mov edx, 0x1001938c
push dword [eax + 0x38]
push 0x47
pop ecx
call fcn.100401e4
push esi
jmp 0x100425a1
mov edi, dword [ebp - 0x20]
mov edx, dword [ebp - 0x10]
add edx, esi
mov esi, dword [ebp - 0x24]
mov byte [edi], bl
cmp bx, si
jae 0x10042614
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, ecx
je 0x100425f5
mov esi, dword [ebp - 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea ecx, [ebp - 0x28]
call fcn.1003fe40
lea ecx, [ebp - 0x2c]
call fcn.1003fe40
mov eax, edi
call fcn.10163e7a
ret 4
mov eax, dword [0x101923c0]
mov esi, 0x80070216
cmp eax, 0x101923c0
je 0x10042663
test byte [eax + 0x44], 1
je 0x10042663
push esi
push dword [eax + 0x3c]
mov edx, 0x1001938c
push dword [eax + 0x38]
push 0x43
pop ecx
call fcn.100401e4
push esi
lea ecx, [ebp - 0x24]
call fcn.1003f8d8
push 0x10191580
mov eax, ecx
jmp 0x100427a0
mov eax, dword [0x101923c0]
mov esi, 0x8007000b
cmp eax, 0x101923c0
je 0x10042663
test byte [eax + 0x44], 1
je 0x10042663
push esi
push dword [eax + 0x3c]
mov edx, 0x1001938c
push dword [eax + 0x38]
push 0x41
jmp 0x1004265d
mov eax, dword [0x101923c0]
mov esi, 0x80070216
cmp eax, 0x101923c0
je 0x10042663
test byte [eax + 0x44], 1
je 0x10042663
push esi
push dword [eax + 0x3c]
mov edx, 0x1001938c
push dword [eax + 0x38]
push 0x40
jmp 0x1004265d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x100426db
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101923c0]
cmp eax, 0x101923c0
je 0x10042663
test byte [eax + 0x44], 1
je 0x10042663
push esi
push dword [eax + 0x3c]
mov edx, 0x1001938c
push dword [eax + 0x38]
push 0x3b
jmp 0x1004265d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1004271d
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101923c0]
cmp eax, 0x101923c0
je 0x10042743
test byte [eax + 0x44], 1
je 0x10042743
push esi
push dword [eax + 0x3c]
mov edx, 0x1001938c
push dword [eax + 0x38]
push 0x3a
pop ecx
call fcn.100401e4
push esi
lea ecx, [ebp - 0x28]
call fcn.1003f8d8
push 0x10191580
mov eax, ecx
jmp 0x100427a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1004276a
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101923c0]
cmp eax, 0x101923c0
je 0x10042790
test byte [eax + 0x44], 1
je 0x10042790
push esi
push dword [eax + 0x3c]
mov edx, 0x1001938c
push dword [eax + 0x38]
push 0x3c
pop ecx
call fcn.100401e4
push esi
lea ecx, [ebp - 0x18]
call fcn.1003f8d8
push 0x10191580
mov eax, ecx
push eax
call sub.msvcrt.dll__CxxThrowException
int3