Function at 0x405570
Capabilities:
Enumerate process modules

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4612d5
push eax
mov eax, 0x1230
mov dword fs:[0], esp
call fcn.00454ff0
mov eax, dword [0x46f42c]
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x24], esi
mov dword [esp + 0xc], eax
mov ecx, dword [esp + 0x1250]
mov ebp, 1
cmp ecx, esi
mov dword [esp + 0x1244], ebp
je 0x40589f
push ebx
push ecx
push esi
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
cmp ebx, esi
mov dword [esp + 0x1c], ebx
je 0x405886
mov ax, word [0x47a15c]
mov ecx, 0x81
mov word [esp + 0x38], ax
xor eax, eax
lea edi, [esp + 0x3a]
lea edx, [esp + 0x240]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x34]
push ecx
push 0x1000
push edx
push ebx
stosw word es:[edi], ax
call sub.PSAPI.DLL_EnumProcessModules
test eax, eax
je 0x40587a
mov ecx, dword [esp + 0x240]
lea eax, [esp + 0x38]
push 0x208
push eax
push ecx
push ebx
call sub.PSAPI.DLL_GetModuleFileNameExW
lea edx, [esp + 0x38]
test edx, edx
je 0x40563f
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], ebp
jg 0x40564d
cmp esi, dword [eax - 4]
jle 0x405668
lea ecx, [esp + 0x10]
call fcn.004083e0
push esi
lea ecx, [esp + 0x14]
call fcn.00408040
test eax, eax
je 0x405690
mov eax, dword [esp + 0x10]
lea edi, [esi + esi]
lea ecx, [esp + 0x38]
push edi
lea edx, [esi + esi + 2]
push ecx
push edx
push eax
call fcn.00407060
mov eax, dword [esp + 0x20]
add esp, 0x10
mov dword [eax - 8], esi
mov ecx, dword [esp + 0x10]
mov word [edi + ecx], 0
mov edx, 0x46fccc
test edx, edx
je 0x40587a
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
test ebp, ebp
je 0x40587a
mov eax, 0x47a15c
test eax, eax
jne 0x4056bd
mov dword [esp + 0x14], eax
jmp 0x4056cc
push 0x47a15c
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp + 0x14], eax
mov esi, dword [esp + 0x10]
xor edi, edi
mov ecx, dword [esi - 8]
lea ebx, [esi + ecx*2]
cmp esi, ebx
jae 0x405876
push 0x46fccc
push esi
call fcn.004553c2
add esp, 8
test eax, eax
je 0x405708
lea esi, [eax + ebp*2]
push 0x46fccc
push esi
inc edi
call fcn.004553c2
add esp, 8
test eax, eax
jne 0x4056f2
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp esi, ebx
jb 0x4056e0
test edi, edi
jle 0x405876
lea ecx, [esp + 0x10]
call fcn.00408290
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
sub ebx, ebp
imul ebx, edi
mov ecx, dword [eax - 8]
mov dword [esp + 0x18], ecx
add ebx, ecx
mov ecx, dword [eax - 4]
mov dword [esp + 0x30], ebx
cmp ecx, ebx
jl 0x40574f
cmp dword [eax - 0xc], 1
jle 0x405797
lea edi, [eax - 0xc]
push ebx
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], edi
mov esi, eax
call fcn.00408040
test eax, eax
je 0x405876
mov ecx, dword [edi + 4]
lea edx, [ebx + ebx + 2]
shl ecx, 1
cmp edx, ecx
jb 0x40578d
mov edi, dword [esp + 0x10]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x20]
push edi
call fcn.00408420
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 8]
mov edi, eax
lea ecx, [eax + ecx*2]
cmp eax, ecx
mov dword [esp + 0x2c], ecx
jae 0x405873
push 0x46fccc
push edi
call fcn.004553c2
mov esi, eax
add esp, 8
test esi, esi
je 0x405858
mov eax, dword [esp + 0x14]
mov edx, eax
neg edx
shl edx, 0x1f
sub edx, eax
inc edx
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov eax, esi
mov edi, dword [edx - 4]
sub eax, edx
mov edx, dword [esp + 0x20]
sar eax, 1
sub ecx, eax
sub edi, eax
mov eax, dword [esp + 0x14]
sub ecx, ebp
add edx, edi
add eax, eax
lea ebx, [ecx + ecx]
lea ecx, [esi + ebp*2]
push ebx
add eax, esi
shl edx, 1
push ecx
push edx
push eax
mov dword [esp + 0x34], eax
call fcn.00407090
mov eax, dword [esp + 0x24]
lea ecx, [edi + edi + 2]
add eax, eax
push eax
push 0x47a15c
push ecx
push esi
call fcn.00407060
mov edi, dword [esp + 0x44]
mov edx, dword [esp + 0x34]
sub edx, ebp
push 0x46fccc
mov word [ebx + edi], 0
mov ebx, dword [esp + 0x3c]
add ebx, edx
push edi
mov dword [esp + 0x40], ebx
call fcn.004553c2
mov esi, eax
add esp, 0x28
test esi, esi
jne 0x4057d5
mov ebx, dword [esp + 0x30]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [edi + eax*2 + 2]
mov eax, dword [esp + 0x2c]
cmp edi, eax
jb 0x4057ab
mov eax, dword [esp + 0x10]
mov dword [eax - 8], ebx
mov ebx, dword [esp + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, 1
lea ecx, [esp + 0x10]
call fcn.00408290
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_CharLowerW]
mov eax, dword [esp + 0x10]
pop ebx
mov edx, dword [eax - 0xc]
mov esi, dword [esp + 0x124c]
lea ecx, [eax - 0xc]
test edx, edx
jl 0x4058bb
push ecx
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x4058d9
mov ecx, dword [0x46f42c]
mov edi, eax
test eax, eax
mov dword [esi], ecx
je 0x4058d0
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
push eax
mov ecx, esi
call fcn.004080a0
mov dword [esp + 0x24], ebp
lea ecx, [esp + 0xc]
mov byte [esp + 0x1244], 0
call fcn.00408010
mov ecx, dword [esp + 0x123c]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x123c
ret