Function at 0x421830
Capabilities:
Get process image filename
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x584
mov eax, dword [0x4bd450]
xor eax, esp
mov dword [esp + 0x57c], eax
mov eax, dword [esp + 0x58c]
push ebx
mov ebx, dword [esp + 0x58c]
push ebp
push esi
push edi
mov edi, edx
mov dword [esp + 0x2c], eax
xor eax, eax
xor ebp, ebp
mov dword [esp + 0x28], ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
test edi, edi
je 0x421c2b
mov eax, dword [0x5185e8]
test eax, eax
jne 0x4218bf
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [0x5185e8], eax
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp dword [0x5185ec], ebp
jne 0x4218e7
push str.NtWow64QueryInformationProcess64
push eax
call esi
mov dword [0x5185ec], eax
test eax, eax
je 0x421c29
mov eax, dword [0x5185e8]
cmp dword [0x5185f0], ebp
jne 0x421904
push str.NtWow64ReadVirtualMemory64
push eax
call esi
mov dword [0x5185f0], eax
test eax, eax
je 0x421c29
push edi
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebp, eax
xor edi, edi
cmp ebp, edi
je 0x421c25
push 0x20a
lea edx, [esp + 0x37c]
push edi
push edx
call fcn.00476ef0
add esp, 0xc
push 0x105
lea eax, [esp + 0x37c]
push eax
push edi
push ebp
call sub.PSAPI.DLL_GetModuleFileNameExW
test eax, eax
jne 0x421963
push 0x105
lea ecx, [esp + 0x37c]
push ecx
push ebp
call sub.PSAPI.DLL_GetProcessImageFileNameW
test eax, eax
je 0x42198f
lea eax, [esp + 0x378]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x421970
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x37c]
push edx
mov eax, ebx
call fcn.004086f0
lea eax, [esp + 0x24]
push eax
push 0x30
lea ecx, [esp + 0x60]
push ecx
push edi
push ebp
mov dword [esp + 0x38], edi
call dword [0x5185ec]
test eax, eax
jne 0x421c18
mov edx, dword [esp + 0x24]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x64]
push edi
push 0x28
lea ecx, [esp + 0x3c]
push ecx
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x74]
push edx
push eax
push ebp
mov dword [esp + 0x38], edi
call dword [0x5185f0]
test eax, eax
jne 0x421c18
push 0x2f0
lea ecx, [esp + 0x8c]
push edi
push ecx
call fcn.00476ef0
mov ecx, dword [esp + 0x60]
add esp, 0xc
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x54]
push edi
push 0x2f0
lea eax, [esp + 0x94]
push eax
push ecx
push edx
push ebp
call dword [0x5185f0]
test eax, eax
jne 0x421c18
mov si, word [esp + 0xf8]
cmp si, di
je 0x421c18
mov ecx, dword [esp + 0x100]
mov eax, dword [esp + 0x104]
mov edx, ecx
or edx, eax
je 0x421c18
mov ebx, dword [esp + 0x90]
and ebx, 1
jne 0x421aa1
cmp eax, dword [esp + 0x54]
ja 0x421aa1
mov eax, dword [esp + 0x50]
jb 0x421a90
cmp ecx, eax
jae 0x421aa1
add eax, ecx
cdq
mov dword [esp + 0x100], eax
mov dword [esp + 0x104], edx
movzx esi, si
shr esi, 1
inc esi
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
push 0x512dc0
neg ecx
or ecx, eax
push ecx
call fcn.00472b75
mov edi, eax
add esp, 8
test edi, edi
je 0x421b3b
lea eax, [esi + esi]
push eax
push 0
push edi
call fcn.00476ef0
movzx eax, word [esp + 0x104]
add esp, 0xc
cdq
lea ecx, [esp + 0x18]
push ecx
push edx
mov edx, dword [esp + 0x10c]
push eax
mov eax, dword [esp + 0x10c]
push edi
push edx
push eax
push ebp
call dword [0x5185f0]
test eax, eax
jne 0x421b32
mov eax, edi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x421b10
sub eax, edx
sar eax, 1
push eax
mov eax, dword [esp + 0x30]
push edi
call fcn.004086f0
mov dword [esp + 0x14], 1
push edi
call fcn.00472eb2
add esp, 4
mov si, word [esp + 0x138]
test si, si
je 0x421c18
mov ecx, dword [esp + 0x140]
mov eax, dword [esp + 0x144]
mov edx, ecx
or edx, eax
je 0x421c18
test ebx, ebx
jne 0x421b89
cmp eax, dword [esp + 0x54]
ja 0x421b89
mov eax, dword [esp + 0x50]
jb 0x421b78
cmp ecx, eax
jae 0x421b89
add eax, ecx
cdq
mov dword [esp + 0x140], eax
mov dword [esp + 0x144], edx
movzx esi, si
shr esi, 1
inc esi
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
push 0x512dc0
neg ecx
or ecx, eax
push ecx
call fcn.00472b75
mov edi, eax
add esp, 8
test edi, edi
je 0x421c18
lea eax, [esi + esi]
push eax
push 0
push edi
call fcn.00476ef0
movzx eax, word [esp + 0x144]
add esp, 0xc
cdq
lea ecx, [esp + 0x18]
push ecx
push edx
mov edx, dword [esp + 0x14c]
push eax
mov eax, dword [esp + 0x14c]
push edi
push edx
push eax
push ebp
call dword [0x5185f0]
test eax, eax
jne 0x421c0f
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x421bf5
sub eax, edx
sar eax, 1
push eax
mov eax, dword [esp + 0x2c]
push edi
call fcn.004086f0
push edi
call fcn.00472eb2
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
jmp 0x421c2b
mov eax, edi
jmp 0x421c2b
mov eax, ebp
mov ecx, dword [esp + 0x58c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00471eba
add esp, 0x584
ret 8