Function at 0x403540
Capabilities:
Check for peb beingdebugged flag
Enumerate processes
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x42a9b0
push eax
mov eax, 0x2284
mov dword fs:[0], esp
call fcn.0042a3e0
mov al, byte [esp + 2]
push ebx
push ebp
push esi
push edi
mov edi, ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0x7c], edi
mov byte [esp + 0x1c], al
call fcn.0041c870
xor ebp, ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], ebp
mov cl, byte [esp + 0x12]
mov dword [esp + 0x229c], ebp
mov byte [esp + 0x4c], cl
lea ecx, [esp + 0x50]
call fcn.0041c870
mov dword [esp + 0x60], ebp
mov dword [esp + 0x64], ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x70], ebp
mov dword [esp + 0x74], ebp
mov dword [esp + 0x78], ebp
lea edx, [esp + 0x200]
mov byte [esp + 0x229c], 1
push edx
mov byte [esp + 0x17], 0
mov dword [esp + 0x204], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x210], 2
sete bl
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
lea edx, [esp + 0x84]
push eax
lea ecx, [edi + 0x28]
push edx
call fcn.00405030
test bl, bl
jne 0x4038a7
push ebp
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
cmp eax, ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0xd8], 0x128
jne 0x403688
mov eax, dword [esp + 0x78]
mov byte [esp + 0x229c], bl
cmp eax, ebp
je 0x40365d
lea ecx, [esp + 0x4c]
call fcn.00404820
cmp dword [esp + 0x78], ebp
jne 0x40364e
mov eax, dword [esp + 0x48]
mov dword [esp + 0x229c], 0xffffffff
cmp eax, ebp
je 0x403e5c
lea ecx, [esp + 0x1c]
call fcn.004046b0
cmp dword [esp + 0x48], ebp
jne 0x403674
jmp 0x403e5c
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0xd8]
push eax
push ecx
call sub.KERNEL32.dll_Process32First
mov ebx, dword [esp + 0x22a4]
mov esi, eax
mov ecx, ebx
call fcn.004171c0
cmp esi, ebp
mov esi, dword [esp + 0x14]
je 0x403894
cmp dword [esp + 0xf0], ebp
je 0x40387e
lea edx, [esp + 0xe0]
lea eax, [esp + 0x84]
push edx
push eax
lea ecx, [edi + 0x28]
call fcn.00405030
cmp dword [esp + 0x78], ebp
je 0x403723
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
cmp ecx, edx
je 0x403723
lea eax, [ecx + 4]
cmp eax, edx
mov dword [esp + 0x68], eax
jne 0x403714
lea edx, [esp + 0xe0]
push edx
push ecx
call fcn.00406ac0
add esp, 8
lea ecx, [esp + 0x4c]
call fcn.00405280
jmp 0x40374a
cmp ecx, ebp
je 0x40374a
mov eax, dword [esp + 0xe0]
mov dword [ecx], eax
jmp 0x40374a
lea ecx, [esp + 0x4c]
call fcn.00405280
mov eax, dword [esp + 0x68]
lea edx, [esp + 0xe0]
mov ecx, eax
add eax, 4
push edx
push ecx
mov dword [esp + 0x70], eax
call fcn.00406ac0
add esp, 8
mov eax, dword [esp + 0x78]
push ebp
inc eax
lea ecx, [esp + 0x94]
mov dword [esp + 0x7c], eax
mov al, byte [esp + 0x16]
mov byte [esp + 0x94], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea edi, [esp + 0xfc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x100]
push ecx
lea ecx, [esp + 0x98]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov eax, dword [esp + 0x48]
mov byte [esp + 0x229c], 2
cmp eax, ebp
je 0x4037e0
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
cmp ecx, edx
je 0x4037e0
lea eax, [ecx + 0x10]
cmp eax, edx
mov dword [esp + 0x38], eax
jne 0x4037d6
lea edx, [esp + 0x90]
push edx
push ecx
call fcn.00406950
add esp, 8
lea ecx, [esp + 0x1c]
call fcn.00405280
jmp 0x403807
lea eax, [esp + 0x90]
push eax
jmp 0x4037fe
lea ecx, [esp + 0x1c]
call fcn.00405280
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x90]
mov ecx, eax
add eax, 0x10
mov dword [esp + 0x38], eax
push edx
push ecx
call fcn.00406950
add esp, 8
mov eax, dword [esp + 0x48]
push 1
inc eax
lea ecx, [esp + 0x94]
mov dword [esp + 0x4c], eax
mov byte [esp + 0x22a0], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [esp + 0xfc]
lea ecx, [esp + 0x14]
push eax
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x229c], 3
call sub.MFC42.DLL_CString::MakeLower
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x84], esp
push edx
call sub.MFC42.DLL_CString::CString_2
mov ecx, ebx
call fcn.00416c30
lea ecx, [esp + 0x14]
mov byte [esp + 0x13], 1
mov byte [esp + 0x229c], 1
call sub.MFC42.DLL_CString::CString
mov edi, dword [esp + 0x7c]
lea eax, [esp + 0xd8]
push eax
push esi
call sub.KERNEL32.dll_Process32Next
cmp eax, ebp
jne 0x4036b6
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, ebx
call fcn.00417250
jmp 0x403c3e
push str.psapi.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
cmp esi, ebp
jne 0x403913
push str.psapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebp
jne 0x403913
mov eax, dword [esp + 0x78]
mov byte [esp + 0x229c], 0
cmp eax, ebp
je 0x4038e8
lea ecx, [esp + 0x4c]
call fcn.00404820
cmp dword [esp + 0x78], ebp
jne 0x4038d9
mov eax, dword [esp + 0x48]
mov dword [esp + 0x229c], 0xffffffff
cmp eax, ebp
je 0x403e5c
lea ecx, [esp + 0x1c]
call fcn.004046b0
cmp dword [esp + 0x48], ebp
jne 0x4038ff
jmp 0x403e5c
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.EnumProcesses
push esi
call edi
push str.EnumProcessModules
push esi
mov ebp, eax
call edi
mov ebx, eax
push str.GetModuleFileNameExA
push esi
mov dword [esp + 0xac], ebx
call edi
test ebp, ebp
mov dword [esp + 0x80], eax
je 0x403e10
test ebx, ebx
je 0x403e10
test eax, eax
je 0x403e10
lea ecx, [esp + 0x8c]
lea edx, [esp + 0x294]
push ecx
push 0x1000
push edx
call ebp
test eax, eax
jne 0x4039c3
mov byte [esp + 0x229c], al
mov eax, dword [esp + 0x78]
test eax, eax
je 0x403996
lea ecx, [esp + 0x4c]
call fcn.00404820
mov eax, dword [esp + 0x78]
test eax, eax
jne 0x403985
mov eax, dword [esp + 0x48]
mov dword [esp + 0x229c], 0xffffffff
test eax, eax
je 0x403e5c
lea ecx, [esp + 0x1c]
call fcn.004046b0
mov eax, dword [esp + 0x48]
test eax, eax
jne 0x4039ad
jmp 0x403e5c
mov ebx, dword [esp + 0x22a4]
mov esi, dword [esp + 0x8c]
mov ecx, ebx
shr esi, 2
call fcn.004171c0
test esi, esi
jbe 0x403c35
lea ebp, [esp + 0x294]
mov dword [esp + 0x18], esi
mov eax, dword [ebp]
push eax
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x403c23
lea ecx, [esp + 0x8c]
lea edx, [esp + 0x1294]
push ecx
push 0x1000
push edx
push esi
call dword [esp + 0xb4]
test eax, eax
je 0x403c1c
mov ecx, dword [esp + 0x1294]
lea eax, [esp + 0xd8]
push 0x104
push eax
push ecx
push esi
call dword [esp + 0x90]
test eax, eax
je 0x403c1c
lea edx, [esp + 0xd8]
lea ecx, [esp + 0x14]
push edx
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x229c], 4
call sub.MFC42.DLL_CString::MakeLower
push ecx
lea eax, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0xd0], esp
push eax
call sub.MFC42.DLL_CString::CString_2
mov ecx, ebx
call fcn.00416c30
lea ecx, [esp + 0x14]
mov byte [esp + 0x13], 1
mov byte [esp + 0x229c], 1
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x7c]
lea ecx, [esp + 0xd0]
push ebp
push ecx
lea ecx, [edx + 0x28]
call fcn.00405030
mov ecx, dword [eax]
mov dword [esp + 0x84], ecx
lea ecx, [esp + 0x84]
mov edx, dword [eax + 4]
lea eax, [esp + 0x88]
push eax
push ecx
lea ecx, [esp + 0x98]
mov dword [esp + 0x90], edx
call fcn.00405460
mov eax, dword [esp + 0x78]
test eax, eax
je 0x403b1e
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
cmp ecx, edx
je 0x403b1e
lea eax, [ecx + 4]
push ebp
cmp eax, edx
mov dword [esp + 0x6c], eax
push ecx
jne 0x403b36
call fcn.00406ac0
add esp, 8
lea ecx, [esp + 0x4c]
call fcn.00405280
jmp 0x403b3e
lea ecx, [esp + 0x4c]
call fcn.00405280
mov eax, dword [esp + 0x68]
push ebp
mov ecx, eax
add eax, 4
mov dword [esp + 0x6c], eax
push ecx
call fcn.00406ac0
add esp, 8
mov edx, dword [esp + 0x78]
push 0
inc edx
lea ecx, [esp + 0xb0]
mov dword [esp + 0x7c], edx
mov dl, byte [esp + 0x16]
mov byte [esp + 0xb0], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea edi, [esp + 0xd8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0xd8]
push ecx
push eax
lea ecx, [esp + 0xb4]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov eax, dword [esp + 0x48]
mov byte [esp + 0x229c], 5
test eax, eax
je 0x403bd5
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
cmp ecx, edx
je 0x403bd5
lea eax, [ecx + 0x10]
cmp eax, edx
mov dword [esp + 0x38], eax
jne 0x403bcb
lea edx, [esp + 0xac]
push edx
push ecx
call fcn.00406950
add esp, 8
lea ecx, [esp + 0x1c]
call fcn.00405280
jmp 0x403bfc
lea eax, [esp + 0xac]
push eax
jmp 0x403bf3
lea ecx, [esp + 0x1c]
call fcn.00405280
mov eax, dword [esp + 0x38]
lea edx, [esp + 0xac]
mov ecx, eax
add eax, 0x10
mov dword [esp + 0x38], eax
push edx
push ecx
call fcn.00406950
add esp, 8
mov ecx, dword [esp + 0x48]
push 1
inc ecx
mov byte [esp + 0x22a0], 1
mov dword [esp + 0x4c], ecx
lea ecx, [esp + 0xb0]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
add ebp, 4
dec eax
mov dword [esp + 0x18], eax
jne 0x4039ee
mov ecx, ebx
call fcn.00417250
xor ebp, ebp
cmp dword [esp + 0x48], ebp
jne 0x403c8e
mov eax, dword [esp + 0x78]
mov byte [esp + 0x229c], 0
cmp eax, ebp
je 0x403c63
lea ecx, [esp + 0x4c]
call fcn.00404820
cmp dword [esp + 0x78], ebp
jne 0x403c54
mov eax, dword [esp + 0x48]
mov dword [esp + 0x229c], 0xffffffff
cmp eax, ebp
je 0x403e5c
lea ecx, [esp + 0x1c]
call fcn.004046b0
cmp dword [esp + 0x48], ebp
jne 0x403c7a
jmp 0x403e5c
mov al, byte [esp + 0x12]
push ebp
lea ecx, [esp + 0xc0]
mov byte [esp + 0xc0], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [esp + 0x48]
mov byte [esp + 0x229c], 6
cmp eax, ebp
je 0x403db2
mov esi, dword [esp + 0x22b0]
mov edi, dword [esp + 0x22ac]
mov ebx, dword [esp + 0x22a8]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [esp + 0x28]
mov edx, dword [ecx]
lea ecx, [esp + 0xbc]
push edx
push ebp
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [esp + 0x28]
push ebp
mov ecx, eax
add eax, 0x10
mov dword [esp + 0x2c], eax
call fcn.00406b00
mov eax, dword [esp + 0x48]
dec eax
mov dword [esp + 0x48], eax
je 0x403d16
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
cmp ecx, eax
jne 0x403d1f
lea ecx, [esp + 0x1c]
call fcn.004053e0
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x78]
mov edx, dword [eax]
add eax, 4
dec ecx
mov dword [esp + 0xa8], edx
mov dword [esp + 0x58], eax
mov dword [esp + 0x78], ecx
je 0x403d44
cmp eax, dword [esp + 0x54]
jne 0x403d4d
lea ecx, [esp + 0x4c]
call fcn.004053e0
lea eax, [esp + 0x12]
lea ecx, [esp + 0xa0]
push eax
lea edx, [esp + 0xc0]
push ecx
mov ecx, dword [esp + 0x84]
push edx
call fcn.004034c0
test al, al
je 0x403da8
mov eax, dword [edi + 8]
lea ecx, [esp + 0xa8]
push ecx
push eax
mov ecx, edi
call fcn.00405480
mov eax, dword [ebx + 8]
lea edx, [esp + 0xa0]
push edx
push eax
mov ecx, ebx
call fcn.00405480
mov eax, dword [esi + 8]
lea ecx, [esp + 0x12]
push ecx
push eax
mov ecx, esi
call fcn.00405620
cmp dword [esp + 0x48], ebp
jne 0x403cd0
push 1
lea ecx, [esp + 0xc0]
mov byte [esp + 0x22a0], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [esp + 0x78]
mov byte [esp + 0x229c], 0
cmp eax, ebp
je 0x403de8
lea ecx, [esp + 0x4c]
call fcn.00404820
cmp dword [esp + 0x78], ebp
jne 0x403dd9
mov eax, dword [esp + 0x48]
mov dword [esp + 0x229c], 0xffffffff
cmp eax, ebp
je 0x403e0a
lea ecx, [esp + 0x1c]
call fcn.004046b0
cmp dword [esp + 0x48], ebp
jne 0x403dfb
mov al, byte [esp + 0x13]
jmp 0x403e5e
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x78]
mov byte [esp + 0x229c], 0
test eax, eax
je 0x403e38
lea ecx, [esp + 0x4c]
call fcn.00404820
mov eax, dword [esp + 0x78]
test eax, eax
jne 0x403e27
mov eax, dword [esp + 0x48]
mov dword [esp + 0x229c], 0xffffffff
test eax, eax
je 0x403e5c
lea ecx, [esp + 0x1c]
call fcn.004046b0
mov eax, dword [esp + 0x48]
test eax, eax
jne 0x403e4b
xor al, al
mov ecx, dword [esp + 0x2294]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x2290
ret 0x10