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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57cc38
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x5f6ea4]
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.004784c0
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], 0
mov ecx, edi
cmp dword [edi + 0x14], 8
jb 0x4745df
mov ecx, dword [edi]
lea edx, [ebp - 0x24]
call fcn.00478530
test eax, eax
jne 0x474608
cmp dword [edi + 0x14], 8
mov ecx, edi
jb 0x4745f5
mov ecx, dword [edi]
lea edx, [ebp - 0x24]
call fcn.00478a40
test eax, eax
jne 0x474608
xor esi, esi
jmp 0x474994
mov eax, dword [ebp - 0x24]
mov esi, dword [eax]
cmp esi, eax
je 0x474988
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.004695d0
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.00456360
lea ecx, [ebp - 0x40]
call fcn.004735b0
mov eax, dword [ebp - 0x64]
mov edx, eax
cmp dword [eax + 0x14], 8
jb 0x474695
mov edx, dword [eax]
mov ecx, edi
call fcn.00473c90
test eax, eax
je 0x474852
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 0x474852
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 0x4746da
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 0x474830
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 0x474830
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x6c], eax
cmp dword [eax + 0x14], 8
jb 0x474751
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.00473c90
test eax, eax
je 0x474847
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.004737f0
mov eax, dword [ebp - 0x60]
test eax, eax
je 0x474795
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 0x4747ef
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 0x4747ec
push eax
call ebx
push edi
call ebx
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x47482d
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x474823
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4749c7
push edx
push ecx
call fcn.00536da7
add esp, 8
mov edi, dword [ebp - 0x28]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x47483e
push eax
call ebx
mov ecx, dword [ebp - 0x18]
inc ecx
jmp 0x4746ad
push dword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x474830
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 0x4748d9
test edx, edx
jne 0x474870
xor edi, edi
jmp 0x474872
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 0x4748d0
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 0x4748cd
push eax
call ebx
push edi
call ebx
mov ecx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x60]
inc ecx
jmp 0x47485b
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x474917
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x47490d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4749c7
push edx
push ecx
call fcn.00536da7
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 0x474938
push edi
call ebx
mov eax, dword [esi + 8]
cmp byte [eax + 0xd], 0
je 0x474964
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x474960
nop word [eax + eax]
cmp esi, dword [eax + 8]
jne 0x474960
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x474950
mov esi, eax
jmp 0x47497c
mov esi, eax
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x47497c
nop
mov eax, dword [ecx]
mov esi, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x474970
cmp esi, dword [ebp - 0x24]
jne 0x474620
mov edi, dword [ebp - 0x64]
mov ecx, edi
call fcn.00474100
mov esi, 1
lea ecx, [ebp - 0x24]
call fcn.00478420
push 0x3c
push dword [ebp - 0x24]
call fcn.00536da7
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.00536b66
mov esp, ebp
pop ebp
ret
call fcn.00552841
int3