Function at 0x100043e0
Capabilities:
Enumerate processes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14c
push ebx
push esi
push edi
mov ecx, 6
mov esi, str.taskmgr_nPID_tProcess_name_n
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
xor edi, edi
push 0x124
lea eax, [esp + 0x38]
push edi
push eax
mov dword [esp + 0x3c], edi
call sub.MSVCRT.dll_memset
add esp, 0xc
push edi
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
mov dword [esp + 0xc], esi
cmp esi, 0xffffffff
je 0x10004606
lea ecx, [esp + 0x30]
push ecx
push esi
mov dword [esp + 0x38], 0x128
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
jne 0x10004486
mov dword [esp + 0xc], edi
cmp esi, edi
je 0x10004606
lea edx, [esp + 0xc]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x10004606
test byte [esp + 0xc], 2
jne 0x10004606
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x14]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10004490
sub eax, edx
lea ebx, [eax + 0x10cf2]
cmp ebx, edi
je 0x10004615
lea edi, [ebx + 0x13]
and edi, 0xfffffff0
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x1000460f
push edi
push 0
push esi
call sub.MSVCRT.dll_memset
lea eax, [esp + 0x20]
mov edx, esi
mov ecx, eax
add esp, 0xc
sub edx, ecx
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x100044e0
mov edi, dword [sym.imp.MSVCRT.dll__snprintf]
mov edx, dword [esp + 0x38]
push edx
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
je 0x1000455b
push 0x104
lea ecx, [esp + 0x58]
push ecx
push 0
push eax
call dword [sym.imp.PSAPI.DLL_GetModuleFileNameExA]
lea eax, [esp + 0x54]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10004520
sub eax, edx
jne 0x1000455b
mov edx, dword [str._System_Process_]
mov eax, dword [0x10043b74]
mov ecx, dword [0x10043b78]
mov dword [esp + 0x54], edx
mov edx, dword [0x10043b7c]
mov dword [esp + 0x58], eax
mov al, byte [0x10043b80]
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], edx
mov byte [esp + 0x64], al
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10004560
sub eax, edx
mov edx, dword [esp + 0x38]
lea ecx, [esp + 0x54]
push ecx
push edx
push str._d_t_s_n
add eax, esi
push ebx
push eax
call edi
mov ecx, dword [esp + 0x20]
add esp, 0x14
lea eax, [esp + 0x30]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_Process32Next]
test eax, eax
jne 0x100044f0
lea eax, [esi - 1]
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x100045a0
mov dx, word [0x10043b50]
mov word [eax], dx
mov cl, byte [0x10043b52]
mov byte [eax + 2], cl
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100045c0
sub eax, edx
push 0
lea edx, [esp + 0x10]
push edx
push eax
mov eax, dword [ebp + 8]
push esi
push eax
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x10004606
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov esi, dword [esp + 0xc]
xor edi, edi
mov dword [esp + 0xc], edi
cmp esi, edi
je 0x10004606
lea eax, [esp + 0xc]
push eax
jmp 0x1000445c