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

Disassembly:
push 0x28
mov eax, 0x10167fd6
call fcn.101673a2
mov dword [ebp - 0x28], 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 - 0x34], esi
mov dword [ebp - 4], ebx
test esi, esi
je 0x10041c9c
cmp esi, 0xffffffff
je 0x10041c9c
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 - 0x30], edi
mov byte [ebp - 4], 1
test edi, edi
je 0x10041c65
cmp edi, 0xffffffff
je 0x10041c65
push ebx
push esi
call dword [sym.imp.kernel32.dll_GetFileSize]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x100418d4
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x100418b5
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x10041cfd
test byte [eax + 0x44], 1
jne 0x10041ce9
jmp 0x10041cfd
sub esp, 0xc
lea ecx, [ebp - 0x1c]
push 4
push edi
call fcn.10149ac2
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x1c]
test esi, esi
jne 0x1004193d
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10041902
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x10041928
test byte [eax + 0x44], 1
je 0x10041928
push esi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x3c
pop ecx
call fcn.10149ac2
push esi
lea ecx, [ebp - 0x18]
call fcn.10149ac2
push 0x10196090
mov eax, ecx
jmp 0x10041d0d
cmp dword [ebp - 0x10], 0x40
jae 0x1004196a
mov eax, dword [0x101973c0]
mov esi, 0x8007000b
cmp eax, 0x101973c0
je 0x10041928
test byte [eax + 0x44], 1
je 0x10041928
push esi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x3d
jmp 0x10041922
mov eax, dword [esi + 0x3c]
test eax, eax
jns 0x1004199f
mov eax, dword [0x101973c0]
mov edi, 0x80070216
cmp eax, 0x101973c0
je 0x1004199c
test byte [eax + 0x44], 1
je 0x1004199c
push edi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x3e
pop ecx
call fcn.10149ac2
push edi
jmp 0x10041929
lea edx, [eax + 0xf8]
cmp edx, eax
jb 0x100419ae
mov dword [ebp - 0x14], edx
jmp 0x100419b2
or dword [ebp - 0x14], 0xffffffff
cmp edx, eax
mov edi, 0x80070216
sbb ecx, ecx
and ecx, edi
mov dword [ebp - 0x18], ecx
cmp edx, eax
jae 0x100419f3
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x100419ed
test byte [eax + 0x44], 1
je 0x100419ed
push ecx
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x3f
pop ecx
call fcn.10149ac2
mov ecx, dword [ebp - 0x18]
push ecx
jmp 0x10041929
mov ecx, 0x5a4d
cmp word [esi], cx
jne 0x10041c37
mov ecx, dword [ebp - 0x14]
cmp dword [ebp - 0x10], ecx
jb 0x10041c37
cmp dword [eax + esi], 0x4550
je 0x10041a48
mov eax, dword [0x101973c0]
mov esi, 0x8007000b
cmp eax, 0x101973c0
je 0x10041928
test byte [eax + 0x44], 1
je 0x10041928
push esi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x41
jmp 0x10041922
movzx ecx, word [eax + esi + 6]
lea edx, [eax + 0x18]
mov dword [ebp - 0x24], ecx
movzx ecx, cx
mov dword [ebp - 0x2c], ecx
cmp edx, eax
jb 0x10041a64
mov ecx, edx
mov dword [ebp - 0x18], edx
jmp 0x10041a6a
or ecx, 0xffffffff
mov dword [ebp - 0x18], ecx
cmp edx, eax
mov dword [ebp - 0x14], ecx
sbb ecx, ecx
and ecx, edi
mov dword [ebp - 0x20], ecx
cmp edx, eax
jae 0x10041ab8
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x10041aa3
test byte [eax + 0x44], 1
je 0x10041aa3
push ecx
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x42
pop ecx
call fcn.10149ac2
mov ecx, dword [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x20]
call fcn.10149ac2
push 0x10196090
mov eax, ecx
jmp 0x10041d0d
movzx edx, word [eax + esi + 0x14]
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0x18]
call fcn.10149ac2
mov dword [ebp - 0x20], eax
test eax, eax
jns 0x10041afe
mov ecx, dword [0x101973c0]
cmp ecx, 0x101973c0
je 0x10041afb
test byte [ecx + 0x44], 1
je 0x10041afb
push eax
push dword [ecx + 0x3c]
mov edx, 0x1001932c
push dword [ecx + 0x38]
push 0x43
pop ecx
call fcn.10149ac2
mov eax, dword [ebp - 0x20]
push eax
jmp 0x10041aa4
mov eax, dword [ebp - 0x24]
push ebx
movzx eax, ax
cdq
push 0x28
push edx
push eax
call fcn.10167490
cmp edx, ebx
ja 0x10041bfc
jb 0x10041b22
cmp eax, 0xffffffff
ja 0x10041bfc
mov edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x18]
push ecx
mov ecx, eax
mov dword [ebp - 0x18], eax
call fcn.10149ac2
mov edi, eax
test edi, edi
jns 0x10041b76
mov ecx, dword [0x101973c0]
cmp ecx, 0x101973c0
je 0x10041b61
test byte [ecx + 0x44], 1
je 0x10041b61
push edi
push dword [ecx + 0x3c]
mov edx, 0x1001932c
push dword [ecx + 0x38]
push 0x45
pop ecx
call fcn.10149ac2
push edi
lea ecx, [ebp - 0x24]
call fcn.10149ac2
push 0x10196090
mov eax, ecx
jmp 0x10041d0d
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jae 0x10041bac
mov eax, dword [0x101973c0]
mov esi, 0x8007000b
cmp eax, 0x101973c0
je 0x10041ba9
test byte [eax + 0x44], 1
je 0x10041ba9
push esi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x46
pop ecx
call fcn.10149ac2
push esi
jmp 0x10041b62
mov edi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x14]
add edx, esi
mov esi, dword [ebp - 0x2c]
mov byte [edi], bl
cmp bx, si
jae 0x10041bd8
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 0x10041bb9
mov esi, dword [ebp - 0x1c]
push esi
call dword [sym.imp.kernel32.dll_UnmapViewOfFile]
lea ecx, [ebp - 0x30]
call fcn.1003f382
lea ecx, [ebp - 0x34]
call fcn.1003f382
mov eax, edi
call fcn.10167370
ret 4
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x10041c22
test byte [eax + 0x44], 1
je 0x10041c22
push edi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x44
pop ecx
call fcn.10149ac2
push edi
lea ecx, [ebp - 0x2c]
call fcn.10149ac2
push 0x10196090
mov eax, ecx
jmp 0x10041d0d
mov eax, dword [0x101973c0]
mov esi, 0x8007000b
cmp eax, 0x101973c0
je 0x10041c62
test byte [eax + 0x44], 1
je 0x10041c62
push esi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x40
pop ecx
call fcn.10149ac2
push esi
jmp 0x10041c23
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10041c7a
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x10041c62
test byte [eax + 0x44], 1
je 0x10041c62
push esi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x3a
jmp 0x10041c5c
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10041cb1
movzx esi, si
or esi, 0x80070000
mov eax, dword [0x101973c0]
cmp eax, 0x101973c0
je 0x10041cd7
test byte [eax + 0x44], 1
je 0x10041cd7
push esi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x39
pop ecx
call fcn.10149ac2
push esi
lea ecx, [ebp - 0x30]
call fcn.10149ac2
push 0x10196090
mov eax, ecx
jmp 0x10041d0d
push esi
push dword [eax + 0x3c]
mov edx, 0x1001932c
push dword [eax + 0x38]
push 0x3b
pop ecx
call fcn.10149ac2
push esi
lea ecx, [ebp - 0x1c]
call fcn.10149ac2
push 0x10196090
mov eax, ecx
push eax
call sub.msvcrt.dll__CxxThrowException
int3