Function at 0x46add0
Capabilities:
Get process image filename
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5710c8
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x5e8ea4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x64], edi
xorps xmm0, xmm0
movlpd qword [ebp - 0x24], xmm0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
call fcn.0046e6d0
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 0
mov ecx, edi
cmp dword [edi + 0x14], 8
jb 0x46ae2f
mov ecx, dword [edi]
lea edx, [ebp - 0x24]
call fcn.0046e7f0
test eax, eax
jne 0x46ae58
cmp dword [edi + 0x14], 8
mov ecx, edi
jb 0x46ae45
mov ecx, dword [edi]
lea edx, [ebp - 0x24]
call fcn.0046ed00
test eax, eax
jne 0x46ae58
xor esi, esi
jmp 0x46b1e4
mov eax, dword [ebp - 0x24]
mov esi, dword [eax]
cmp esi, eax
je 0x46b1d8
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [eax + eax]
push dword [esi + 0x10]
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
mov dword [ebp - 0x28], edi
xor eax, eax
mov byte [ebp - 4], 1
push eax
push 0x104
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
call fcn.0045f930
mov byte [ebp - 4], 2
lea eax, [ebp - 0x40]
cmp dword [ebp - 0x2c], 8
push 0
push dword [ebp - 0x30]
cmovae eax, dword [ebp - 0x40]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_K32GetProcessImageFileNameW]
push eax
lea ecx, [ebp - 0x40]
call fcn.004530f0
lea ecx, [ebp - 0x40]
call fcn.00469e00
mov eax, dword [ebp - 0x64]
mov edx, eax
cmp dword [eax + 0x14], 8
jb 0x46aee5
mov edx, dword [eax]
mov ecx, edi
call fcn.0046a4e0
test eax, eax
je 0x46b0a2
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x34]
mov dword [ebp - 0x60], eax
mov eax, dword [esi + 0x34]
add eax, dword [esi + 0x38]
mov dword [ebp - 0x18], ecx
cmp ecx, eax
je 0x46b0a2
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, eax
mov eax, dword [ebp - 0x60]
test eax, eax
je 0x46af2a
mov eax, dword [eax]
mov ecx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x18]
shr ecx, 2
mov dword [ebp - 0x5c], ecx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
dec ecx
and ecx, dword [ebp - 0x5c]
push 2
push 0
push 0
mov eax, dword [eax + ecx*4]
lea ecx, [ebp - 0x1c]
push ecx
mov dword [ebp - 0x14], ebx
and dword [ebp - 0x14], 3
shl dword [ebp - 0x14], 2
mov ecx, dword [ebp - 0x14]
push edx
push dword [ecx + eax]
push edi
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x46b080
push 1
push 0
push 0
push 4
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x68], eax
test eax, eax
je 0x46b080
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x6c], eax
cmp dword [eax + 0x14], 8
jb 0x46afa1
mov eax, dword [eax]
mov dword [ebp - 0x6c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edx, dword [ebp - 0x6c]
mov ecx, eax
call fcn.0046a4e0
test eax, eax
je 0x46b097
xor eax, eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
mov byte [ebp - 4], 4
lea edx, [ebp - 0x58]
mov ecx, dword [ebp - 0x1c]
call fcn.0046a040
mov eax, dword [ebp - 0x60]
test eax, eax
je 0x46afe5
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
dec ecx
and ecx, dword [ebp - 0x5c]
push dword [esi + 0x10]
push 0
mov eax, dword [eax + ecx*4]
mov ecx, dword [ebp - 0x14]
push 0x40
mov eax, dword [ecx + eax]
mov dword [ebp - 0x5c], eax
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x46b03f
mov dword [ebp - 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 1
push 0
push 2
lea ecx, [ebp - 0x14]
push ecx
push eax
push dword [ebp - 0x5c]
push edi
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x46b03c
push eax
call ebx
push edi
call ebx
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x46b07d
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46b073
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46b217
push edx
push ecx
call fcn.0052cac7
add esp, 8
mov edi, dword [ebp - 0x28]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x46b08e
push eax
call ebx
mov ecx, dword [ebp - 0x18]
inc ecx
jmp 0x46aefd
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x46b080
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0x20]
mov dword [ebp - 0x60], edx
mov eax, dword [esi + 0x24]
add eax, dword [esi + 0x20]
mov dword [ebp - 0x5c], ecx
cmp ecx, eax
je 0x46b129
test edx, edx
jne 0x46b0c0
xor edi, edi
jmp 0x46b0c2
mov edi, dword [edx]
mov edx, dword [edi + 8]
mov eax, ecx
push dword [esi + 0x10]
shr eax, 2
dec edx
and edx, eax
and ecx, 3
mov eax, dword [edi + 4]
push 0
push 0x40
mov eax, dword [eax + edx*4]
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0x68], eax
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x46b120
mov dword [ebp - 0x18], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 1
push 0
push 2
lea ecx, [ebp - 0x18]
push ecx
push eax
push dword [ebp - 0x68]
push edi
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x46b11d
push eax
call ebx
push edi
call ebx
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x60]
inc ecx
jmp 0x46b0ab
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x46b167
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x46b15d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x46b217
push edx
push ecx
call fcn.0052cac7
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov byte [ebp - 4], al
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
test edi, edi
je 0x46b188
push edi
call ebx
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
je 0x46b1b4
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x46b1b0
nop word [eax + eax]
cmp esi, dword [eax + 8]
jne 0x46b1b0
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x46b1a0
mov esi, eax
jmp 0x46b1cc
mov esi, eax
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x46b1cc
nop
mov eax, dword [ecx]
mov esi, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x46b1c0
cmp esi, dword [ebp - 0x24]
jne 0x46ae70
mov edi, dword [ebp - 0x64]
mov ecx, edi
call fcn.0046a950
mov esi, 1
lea ecx, [ebp - 0x24]
call fcn.0046e630
push 0x3c
push dword [ebp - 0x24]
call fcn.0052cac7
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052c886
mov esp, ebp
pop ebp
ret
call fcn.00548571
int3