Function at 0x413470
Capabilities:
Get process image filename

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2b8
push ebx
push esi
push edi
push 0x20a
lea eax, [ebp - 0x2b8]
mov edi, ecx
push 0
push eax
mov dword [ebp - 0x24], edi
call sub.VCRUNTIME140.dll_memset
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x2b8]
add esp, 0xc
mov dword [ebp - 0x28], eax
push 0x105
push eax
push esi
call sub.PSAPI.DLL_GetProcessImageFileNameW
test eax, eax
je 0x4134d2
lea eax, [ebp - 0x2b8]
push 0x5c
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
lea ebx, [eax + 2]
push ebx
mov dword [ebp - 0x28], ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcslwr]
add esp, 0xc
push 0x5499a0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
call fcn.00420e00
add esp, 4
lea ecx, [ebp - 0x20]
push eax
push 0x5499a0
call fcn.00403040
push 0x5499a0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
call fcn.00420e00
add esp, 4
lea ecx, [ebp - 0x10]
push eax
push 0x5499a0
call fcn.00403040
push dword [ebp + 0x10]
lea ecx, [ebp - 0xac]
mov dword [ebp - 0x2c], 0
push dword [edi]
push dword [ebp + 0xc]
push esi
call fcn.00418750
jmp 0x413553
mov edi, dword [ebp - 0x24]
lea ecx, [ebp - 0xac]
call fcn.004194a0
mov esi, dword [edi + 0x100]
mov ebx, eax
mov eax, dword [ebp - 0x24]
mov edi, esi
mov dword [ebp + 8], esi
mov ecx, dword [eax + 0x104]
mov eax, 0x2aaaaaab
sub ecx, edi
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
test ecx, ecx
jle 0x4135ba
jmp 0x413590
mov eax, ecx
cdq
sub eax, edx
mov esi, eax
sar esi, 1
lea edx, [esi + esi*2]
cmp ebx, dword [edi + edx*8 + 0x10]
lea eax, [edi + edx*8]
jb 0x4135b1
lea edi, [eax + 0x18]
or eax, 0xffffffff
sub eax, esi
add ecx, eax
jmp 0x4135b3
mov ecx, esi
test ecx, ecx
jg 0x413590
mov esi, dword [ebp + 8]
sub edi, esi
mov eax, 0x2aaaaaab
imul edi
mov eax, 1
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, eax
cmova eax, ecx
lea eax, [eax + eax*2]
mov ecx, dword [esi + eax*8 - 8]
lea esi, [esi + eax*8]
cmp ebx, ecx
jb 0x4137a6
mov eax, dword [esi - 4]
add eax, ecx
cmp ebx, eax
jae 0x4137a6
mov eax, dword [esi - 0x10]
sub ebx, ecx
mov dword [ebp + 8], ebx
test eax, eax
mov ebx, 0x5b3144
mov ecx, ebx
cmovne ecx, eax
push 0x5c
push ecx
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x413621
add ecx, 2
jmp 0x41362b
mov eax, dword [esi - 0x10]
mov ecx, ebx
test eax, eax
cmovne ecx, eax
mov eax, dword [ebp - 0x28]
mov dword [ebp + 0x10], ecx
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x413657
test dx, dx
je 0x413653
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x413657
add ecx, 4
add eax, 4
test dx, dx
jne 0x413631
xor eax, eax
jmp 0x41365c
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4136fb
mov dword [ebp - 0x3c], eax
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
lea eax, [ebp + 8]
mov dword [ebp + 0xc], eax
lea eax, [ebp + 0xc]
push eax
push str.0:X8
call fcn.0040e470
mov eax, dword [ebp - 0x34]
mov esi, ebx
test eax, eax
cmovne esi, eax
push esi
call fcn.00420e00
mov ecx, dword [ebp - 0x20]
mov edi, eax
add esp, 4
lea eax, [edi + ecx]
cmp eax, dword [ebp - 0x1c]
jb 0x4136b0
push eax
lea ecx, [ebp - 0x20]
call fcn.00403220
mov ecx, dword [ebp - 0x20]
lea eax, [edi + edi]
push eax
mov eax, dword [ebp - 0x18]
push esi
lea eax, [eax + ecx*2]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov eax, dword [ebp - 0x18]
add ecx, edi
add esp, 0xc
mov word [eax + ecx*2], dx
lea ecx, [ebp - 0x30]
mov eax, dword [ebp - 0x38]
add dword [ebp - 0x20], edi
add eax, eax
push eax
push dword [ebp - 0x34]
call fcn.00420bb0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
lea eax, [ebp + 8]
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x54], eax
lea ecx, [ebp - 0x4c]
lea eax, [ebp + 0x10]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x54]
push eax
push str.01:X8
mov dword [ebp - 0x44], 0
call fcn.00412c40
mov eax, dword [ebp - 0x44]
mov esi, ebx
test eax, eax
cmovne esi, eax
push esi
call fcn.00420e00
mov ecx, dword [ebp - 0x10]
mov edi, eax
add esp, 4
lea eax, [ecx + edi]
cmp eax, dword [ebp - 0xc]
jb 0x413759
push eax
lea ecx, [ebp - 0x10]
call fcn.00403220
mov ecx, dword [ebp - 0x10]
lea eax, [edi + edi]
push eax
mov eax, dword [ebp - 8]
push esi
lea eax, [eax + ecx*2]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 0x10]
xor edx, edx
mov eax, dword [ebp - 8]
add ecx, edi
add esp, 0xc
mov word [eax + ecx*2], dx
lea ecx, [ebp - 0x40]
mov eax, dword [ebp - 0x48]
add dword [ebp - 0x10], edi
add eax, eax
push eax
push dword [ebp - 0x44]
call fcn.00420bb0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x4c], 0
jmp 0x4137ab
mov ebx, 0x5b3144
mov esi, dword [ebp - 0x2c]
lea ecx, [ebp - 0xac]
inc esi
mov dword [ebp - 0x2c], esi
call fcn.00419860
test al, al
je 0x4137ca
cmp esi, 0x64
jb 0x413550
cmp dword [ebp - 0x20], 0
mov eax, dword [ebp - 8]
je 0x4137d6
mov eax, dword [ebp - 0x18]
test eax, eax
cmovne ebx, eax
push ebx
call fcn.00436ac0
mov ecx, dword [ebp - 0x24]
add esp, 4
mov dword [ecx + 0x9c], eax
lea ecx, [ebp - 0xac]
call fcn.00418900
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 4]
add eax, eax
push eax
push dword [ebp - 8]
call fcn.00420bb0
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x14]
add eax, eax
mov dword [ebp - 8], 0
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
call fcn.00420bb0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc