Function at 0x40af90
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4218e8
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x42c008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
mov eax, 0x490
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x40], eax
xor eax, eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
xor al, al
mov byte [ebp - 0x39], al
mov byte [ebp - 0x3a], al
xor eax, eax
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x70], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor ecx, ecx
movzx eax, ax
mov dword [ebp - 0x4c], ecx
test edi, edi
jne 0x40b008
mov dword [ebp - 0x64], 0x57
jmp 0x40b078
mov ecx, 0x105
cmp ax, cx
je 0x40b115
push str.GetSystemFirmwareTable
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40b078
push 0
push 0
push 0
push 0x52534d42
mov ecx, esi
call dword [0x4222bc]
call esi
mov edi, eax
test edi, edi
je 0x40b075
xor ecx, ecx
add eax, 0x400
setb cl
neg ecx
or ecx, eax
push ecx
call fcn.00414596
mov ecx, eax
add esp, 4
mov dword [ebp - 0x7c], ecx
test ecx, ecx
jne 0x40b0b3
mov dword [ebp - 0x64], 8
mov edi, dword [ebp - 0x44]
push 0
call fcn.00414591
push dword [ebp - 0x7c]
call fcn.00414591
push dword [ebp - 0x70]
call fcn.00414591
mov eax, dword [ebp - 0x64]
add esp, 0xc
mov dword [edi], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040ffbe
mov esp, ebp
pop ebp
ret
lea eax, [edi + 0x400]
push eax
push 0
push ecx
call fcn.004112e0
add esp, 0xc
mov ecx, esi
push edi
mov edi, dword [ebp - 0x7c]
push edi
push 0
push 0x52534d42
call dword [0x4222bc]
call esi
test eax, eax
je 0x40b075
mov al, byte [edi + 1]
mov cl, byte [edi + 2]
mov byte [ebp - 0x39], al
mov byte [ebp - 0x3a], cl
cmp al, 2
jae 0x40b0fc
mov eax, 0x718
mov dword [ebp - 0x64], eax
jmp 0x40b075
lea eax, [edi + 8]
mov dword [ebp - 0x54], eax
mov eax, dword [edi + 4]
mov edi, dword [ebp - 0x44]
mov dword [ebp - 0x58], eax
xor eax, eax
mov dword [ebp - 0x64], eax
jmp 0x40b361
push str.NtOpenSection
push str.ntdll.dll
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], 0x2e002c
mov dword [ebp - 0x1c], str.DevicePhysicalMemory
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40b33a
lea eax, [ebp - 0x20]
mov dword [ebp - 0x38], 0x18
mov dword [ebp - 0x30], eax
mov ecx, esi
lea eax, [ebp - 0x38]
mov dword [ebp - 0x34], 0
push eax
push 4
lea eax, [ebp - 0x18]
mov dword [ebp - 0x2c], 0x40
push eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
call dword [0x4222bc]
call esi
test eax, eax
js 0x40b33a
push 0x10000
push 0xf0000
push 0
push 4
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edx, eax
mov dword [ebp - 0x4c], edx
test edx, edx
je 0x40b336
mov esi, edx
xor eax, eax
nop
cmp dword [esi], 0x5f4d535f
je 0x40b1d5
add eax, 0x10
add esi, 0x10
cmp eax, 0x10000
jb 0x40b1c0
mov eax, esi
sub eax, edx
cmp eax, 0x10000
je 0x40b332
mov al, byte [esi + 5]
cmp al, 0x1f
ja 0x40b332
cmp al, 0x1e
je 0x40b1fb
cmp al, 0x1f
jne 0x40b332
movzx eax, al
sub eax, edx
add eax, esi
cmp eax, 0x10000
ja 0x40b332
movzx eax, word [esi + 0x16]
test ax, ax
je 0x40b332
mov ecx, 0x494d445f
cmp ecx, dword [esi + 0x10]
jne 0x40b332
mov ecx, 0x5f
cmp cl, byte [esi + 0x14]
jne 0x40b332
mov cl, byte [esi + 6]
mov ch, byte [esi + 7]
mov byte [ebp - 0x39], cl
mov byte [ebp - 0x3a], ch
cmp cl, 2
jb 0x40b332
mov esi, dword [esi + 0x18]
mov edi, eax
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, esi
lea eax, [edi + 0xfff]
and ecx, 0xfff
add eax, ecx
mov dword [ebp - 0x40], ecx
and eax, 0xfffff000
sub esi, ecx
push eax
push esi
push 0
push 4
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
mov dword [ebp - 0x4c], esi
test esi, esi
je 0x40b32d
xor ecx, ecx
mov eax, edi
add eax, 0x400
setb cl
neg ecx
or ecx, eax
push ecx
call fcn.00414596
mov edx, eax
add esp, 4
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x40b2bf
mov edi, dword [ebp - 0x44]
mov ecx, 8
mov dword [ebp - 0x64], ecx
jmp 0x40b341
lea eax, [edi + 0x400]
push eax
push 0
push edx
call fcn.004112e0
mov eax, dword [ebp - 0x40]
push edi
add eax, esi
push eax
push dword [ebp - 0x70]
call fcn.00410bc0
mov eax, dword [ebp - 0x70]
add esp, 0x18
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x58], edi
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edi, dword [ebp - 0x44]
xor esi, esi
xor ecx, ecx
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x64], ecx
jmp 0x40b341
mov edi, dword [ebp - 0x44]
jmp 0x40b33c
mov esi, edx
jmp 0x40b33c
mov esi, eax
jmp 0x40b33c
xor esi, esi
mov ecx, 0x490
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x40b359
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x64]
test ecx, ecx
jne 0x40b87d
push 1
lea eax, [ebp - 0x40]
push eax
push 1
push dword [ebp - 0x58]
push dword [ebp - 0x54]
call fcn.0040bf20
add esp, 0x14
test eax, eax
jne 0x40b3a7
mov esi, dword [ebp - 0x40]
lea eax, [edi + 4]
push eax
movzx eax, byte [esi + 7]
push eax
push esi
call fcn.0040b8b0
mov al, byte [ebp - 0x39]
add esp, 0xc
cmp al, 2
ja 0x40b39f
jne 0x40b3a7
cmp byte [ebp - 0x3a], 1
jb 0x40b3a7
movups xmm0, xmmword [esi + 8]
movups xmmword [edi + 8], xmm0
push 1
lea eax, [ebp - 0x40]
push eax
push 2
push dword [ebp - 0x58]
push dword [ebp - 0x54]
call fcn.0040bf20
add esp, 0x14
test eax, eax
jne 0x40b3e5
mov esi, dword [ebp - 0x40]
lea eax, [edi + 0x18]
push eax
movzx eax, byte [esi + 7]
push eax
push esi
call fcn.0040b8b0
lea eax, [edi + 0x1c]
push eax
movzx eax, byte [esi + 8]
push eax
push esi
call fcn.0040b8b0
add esp, 0x18
push 1
lea eax, [ebp - 0x40]
push eax
push 3
push dword [ebp - 0x58]
push dword [ebp - 0x54]
call fcn.0040bf20
add esp, 0x14
test eax, eax
jne 0x40b423
mov esi, dword [ebp - 0x40]
lea eax, [edi + 0x20]
push eax
movzx eax, byte [esi + 7]
push eax
push esi
call fcn.0040b8b0
lea eax, [edi + 0x24]
push eax
movzx eax, byte [esi + 8]
push eax
push esi
call fcn.0040b8b0
add esp, 0x18
push 1
lea eax, [ebp - 0x40]
push eax
push 4
push dword [ebp - 0x58]
push dword [ebp - 0x54]
call fcn.0040bf20
add esp, 0x14
test eax, eax
jne 0x40b47c
mov esi, dword [ebp - 0x40]
mov eax, dword [esi + 8]
mov dword [edi + 0x28], eax
mov eax, dword [esi + 0xc]
mov dword [edi + 0x2c], eax
mov al, byte [ebp - 0x39]
cmp al, 2
ja 0x40b45b
jne 0x40b47c
cmp byte [ebp - 0x3a], 3
jb 0x40b47c
lea eax, [edi + 0x30]
push eax
movzx eax, byte [esi + 0x20]
push eax
push esi
call fcn.0040b8b0
lea eax, [edi + 0x34]
push eax
movzx eax, byte [esi + 0x21]
push eax
push esi
call fcn.0040b8b0
add esp, 0x18
mov byte [ebp - 0x78], 1
mov dword [ebp - 4], 2
call fcn.0040aba0
mov edi, eax
test edi, edi
je 0x40b891
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x4222bc]
mov ecx, edi
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0x60], esi
push dword [ebp - 0x78]
mov edi, dword [ebp - 0x54]
lea eax, [ebp - 0x74]
push eax
push 0x11
push dword [ebp - 0x58]
mov dword [ebp - 4], 3
push edi
call fcn.0040bf20
add esp, 0x14
test eax, eax
jne 0x40b7a9
mov al, byte [ebp - 0x39]
cmp al, 2
ja 0x40b4eb
jne 0x40b772
cmp byte [ebp - 0x3a], 3
jb 0x40b772
mov esi, dword [ebp - 0x74]
lea eax, [ebp - 0x60]
push eax
movzx eax, byte [esi + 0x1a]
push eax
push esi
call fcn.0040b8b0
add esp, 0xc
test eax, eax
jne 0x40b5c5
mov ecx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x60]
add ecx, 0x38
mov edi, esi
mov dword [ebp - 0x48], ecx
mov eax, dword [ecx]
sub edi, eax
mov edx, dword [esi - 0xc]
mov dword [ebp - 0x5c], edi
mov edi, dword [eax - 0xc]
mov dword [ebp - 0x40], edi
test edx, edx
js 0x40b89b
test esi, esi
jne 0x40b536
xor edx, edx
jmp 0x40b545
push edx
push esi
call fcn.00414a37
mov ecx, dword [ebp - 0x48]
add esp, 8
mov edx, eax
mov eax, 0x7fffffff
mov dword [ebp - 0x50], edx
sub eax, edx
cmp eax, edi
jl 0x40b89b
add edi, edx
js 0x40b89b
mov eax, dword [ecx]
mov ecx, 1
mov dword [ebp - 0x68], eax
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edi
or eax, ecx
jge 0x40b588
mov ecx, dword [ebp - 0x48]
push edi
call fcn.0040bce0
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x50]
mov ecx, dword [eax]
jmp 0x40b58b
mov ecx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x5c]
mov esi, dword [ebp - 0x5c]
add eax, ecx
cmp esi, dword [ebp - 0x40]
push edx
cmova eax, dword [ebp - 0x60]
push eax
mov eax, dword [ebp - 0x40]
push edx
add eax, ecx
push eax
call fcn.0040c3d0
mov eax, dword [ebp - 0x48]
add esp, 0x10
mov ecx, dword [eax]
cmp edi, dword [ecx - 8]
jg 0x40b89b
mov esi, dword [ebp - 0x74]
mov dword [ecx - 0xc], edi
mov eax, dword [eax]
mov byte [edi + eax], 0
lea eax, [ebp - 0x60]
push eax
movzx eax, byte [esi + 0x18]
push eax
push esi
call fcn.0040b8b0
add esp, 0xc
test eax, eax
jne 0x40b69c
mov ecx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x60]
add ecx, 0x3c
mov edi, esi
mov dword [ebp - 0x48], ecx
mov eax, dword [ecx]
sub edi, eax
mov edx, dword [esi - 0xc]
mov dword [ebp - 0x5c], edi
mov edi, dword [eax - 0xc]
mov dword [ebp - 0x50], edi
test edx, edx
js 0x40b89b
test esi, esi
jne 0x40b60d
xor edx, edx
jmp 0x40b61c
push edx
push esi
call fcn.00414a37
mov ecx, dword [ebp - 0x48]
add esp, 8
mov edx, eax
mov eax, 0x7fffffff
mov dword [ebp - 0x40], edx
sub eax, edx
cmp eax, edi
jl 0x40b89b
add edi, edx
js 0x40b89b
mov eax, dword [ecx]
mov ecx, 1
mov dword [ebp - 0x68], eax
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edi
or eax, ecx
jge 0x40b65f
mov ecx, dword [ebp - 0x48]
push edi
call fcn.0040bce0
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x40]
mov ecx, dword [eax]
jmp 0x40b662
mov ecx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x5c]
mov esi, dword [ebp - 0x5c]
add eax, ecx
cmp esi, dword [ebp - 0x50]
push edx
cmova eax, dword [ebp - 0x60]
push eax
mov eax, dword [ebp - 0x50]
push edx
add eax, ecx
push eax
call fcn.0040c3d0
mov eax, dword [ebp - 0x48]
add esp, 0x10
mov ecx, dword [eax]
cmp edi, dword [ecx - 8]
jg 0x40b89b
mov esi, dword [ebp - 0x74]
mov dword [ecx - 0xc], edi
mov eax, dword [eax]
mov byte [edi + eax], 0
lea eax, [ebp - 0x60]
push eax
movzx eax, byte [esi + 0x19]
push eax
push esi
call fcn.0040b8b0
mov esi, dword [ebp - 0x60]
add esp, 0xc
test eax, eax
jne 0x40b772
mov ecx, dword [ebp - 0x44]
mov edi, esi
mov edx, dword [esi - 0xc]
add ecx, 0x40
mov dword [ebp - 0x48], ecx
mov eax, dword [ecx]
sub edi, eax
mov dword [ebp - 0x40], edi
mov edi, dword [eax - 0xc]
mov dword [ebp - 0x5c], edi
test edx, edx
js 0x40b89b
test esi, esi
jne 0x40b6e4
xor edx, edx
jmp 0x40b6f3
push edx
push esi
call fcn.00414a37
mov ecx, dword [ebp - 0x48]
add esp, 8
mov edx, eax
mov eax, 0x7fffffff
mov dword [ebp - 0x50], edx
sub eax, edx
cmp eax, edi
jl 0x40b89b
add edi, edx
js 0x40b89b
mov eax, dword [ecx]
mov ecx, 1
mov dword [ebp - 0x68], eax
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edi
or eax, ecx
jge 0x40b736
mov ecx, dword [ebp - 0x48]
push edi
call fcn.0040bce0
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x50]
mov ecx, dword [eax]
jmp 0x40b739
mov ecx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x40]
push edx
mov edx, dword [ebp - 0x40]
add eax, ecx
cmp edx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x50]
cmova eax, esi
push eax
mov eax, dword [ebp - 0x5c]
push edx
add eax, ecx
push eax
call fcn.0040c3d0
mov eax, dword [ebp - 0x48]
add esp, 0x10
mov ecx, dword [eax]
cmp edi, dword [ecx - 8]
jg 0x40b89b
mov dword [ecx - 0xc], edi
mov eax, dword [eax]
mov byte [edi + eax], 0
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40b79d
mov edi, dword [esi]
push esi
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4222bc]
mov ecx, edi
call esi
add byte [ebp - 0x78], 1
jne 0x40b480
jmp 0x40b7d4
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40b7d7
mov edi, dword [esi]
push esi
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4222bc]
mov ecx, edi
call esi
mov edi, dword [ebp - 0x54]
mov al, byte [ebp - 0x39]
cmp al, 2
ja 0x40b7e7
jne 0x40b81c
mov al, byte [ebp - 0x3a]
cmp al, 1
jb 0x40b823
push 1
lea eax, [ebp - 0x68]
push eax
push 0x16
push dword [ebp - 0x58]
push edi
call fcn.0040bf20
add esp, 0x14
test eax, eax
jne 0x40b817
mov ecx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x44]
add eax, 0x44
push eax
movzx eax, byte [ecx + 7]
push eax
push ecx
call fcn.0040b8b0
add esp, 0xc
mov al, byte [ebp - 0x39]
cmp al, 2
ja 0x40b827
jne 0x40b877
mov al, byte [ebp - 0x3a]
cmp al, 3
jb 0x40b877
push 1
lea eax, [ebp - 0x68]
push eax
push 0x27
push dword [ebp - 0x58]
push edi
call fcn.0040bf20
mov edi, dword [ebp - 0x44]
add esp, 0x14
test eax, eax
jne 0x40b87a
mov esi, dword [ebp - 0x68]
lea eax, [edi + 0x48]
push eax
movzx eax, byte [esi + 0xa]
push eax
push esi
call fcn.0040b8b0
lea eax, [edi + 0x4c]
push eax
movzx eax, byte [esi + 8]
push eax
push esi
call fcn.0040b8b0
lea eax, [edi + 0x50]
push eax
movzx eax, byte [esi + 9]
push eax
push esi
call fcn.0040b8b0
add esp, 0x24
jmp 0x40b87a
mov edi, dword [ebp - 0x44]
mov esi, dword [ebp - 0x4c]
test esi, esi
je 0x40b078
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x40b078
push 0x80004005
call fcn.004091c0
push 0x80070057
call fcn.004091c0
int3