Function at 0x413773
Capabilities:
Enumerate process modules
Enumerate processes
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x46ac
mov eax, dword [0x417028]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push edi
shl eax, 2
push eax
push 0x40
call esi
mov dword [ebp - 0x20], eax
call fcn.004115bb
lea ecx, [ebp - 0x28]
push ecx
mov ecx, dword [0x417028]
shl ecx, 2
push ecx
push dword [ebp - 0x20]
push 0x10
call dword [eax]
mov edi, 0xc0000004
jmp 0x4137f5
mov eax, dword [0x417028]
push dword [ebp - 0x20]
add eax, eax
mov dword [0x417028], eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [0x417028]
shl eax, 2
push eax
push 0x40
call esi
mov dword [ebp - 0x20], eax
call fcn.004115bb
lea ecx, [ebp - 0x28]
push ecx
mov ecx, dword [0x417028]
shl ecx, 2
push ecx
push dword [ebp - 0x20]
push 0x10
call dword [eax]
cmp eax, edi
je 0x4137b6
mov eax, dword [ebp - 0x20]
shr dword [ebp - 0x28], 4
xor ebx, ebx
push ebx
add eax, 4
push 2
mov dword [ebp - 0x18], eax
mov dword [0x41c6ec], ebx
mov dword [0x41c70c], ebx
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x14], esi
je 0x413848
lea eax, [ebp - 0x698]
push eax
push esi
mov dword [ebp - 0x698], 0x22c
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x413850
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
jmp 0x4140c3
mov dword [ebp - 0xc], ebx
call fcn.0040e8ce
cmp byte [eax + 2], bl
je 0x4139f9
push 0x400
lea eax, [ebp - 0x1e98]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x1e98]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x1e98]
push eax
lea eax, [ebp - 0x1698]
push 0x40e544
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x1698]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x4139f9
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x444]
push 0x40e4f0
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
pop ecx
pop ecx
push ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x444]
push eax
call edi
push eax
lea eax, [ebp - 0x444]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [0x41c6fc]
lea eax, [ebp - 0x444]
push 0x40e4c0
push eax
call esi
add esp, 0xc
push ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x444]
push eax
call edi
push eax
lea eax, [ebp - 0x444]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x444]
push 0x40e4bc
push eax
call esi
pop ecx
pop ecx
push ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x444]
push eax
call edi
push eax
lea eax, [ebp - 0x444]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
cmp dword [0x41c6fc], ebx
jbe 0x4139ca
mov dword [ebp - 8], ebx
mov ecx, dword [0x41c6f4]
mov edx, dword [ebp - 8]
inc eax
lea ecx, [edx + ecx + 0x1800]
push ecx
push eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x444]
push 0x40e4ac
push eax
call esi
add esp, 0x10
push ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x444]
push eax
call edi
push eax
lea eax, [ebp - 0x444]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x2c]
add dword [ebp - 8], 0x2000
cmp eax, dword [0x41c6fc]
jb 0x413972
lea eax, [ebp - 0x444]
push 0x40e458
push eax
call esi
pop ecx
pop ecx
push ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x444]
push eax
call edi
push eax
lea eax, [ebp - 0x444]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x690]
mov dword [ebp - 0x1e9c], eax
lea eax, [ebp - 0x674]
push eax
lea eax, [ebp - 0x1e98]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
sub esp, 0x804
mov edi, esp
mov ecx, 0x201
lea esi, [ebp - 0x1e9c]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x41c710
call fcn.00412662
push dword [ebp - 0x690]
push 8
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x1c], esi
je 0x413c68
lea eax, [ebp - 0x46c]
push eax
push esi
mov dword [ebp - 0x46c], 0x428
call sub.KERNEL32.dll_Module32FirstW
test eax, eax
jne 0x413a74
push esi
jmp 0x413c62
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x1698]
push eax
call esi
lea eax, [ebp - 0x1698]
push eax
call dword [sym.imp.USER32.dll_CharUpperW]
lea eax, [ebp - 0x24c]
push 0x40e3c0
push eax
call fcn.004116f6
test al, al
pop ecx
pop ecx
je 0x413c48
cmp dword [0x41c6fc], ebx
mov dword [ebp - 0x10], ebx
jbe 0x413c48
mov dword [ebp - 8], ebx
mov eax, dword [0x41c6f4]
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax + 0x1800]
push eax
lea eax, [ebp - 0x1698]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrW]
lea ecx, [ebp - 0x1698]
cmp eax, ecx
jne 0x413c2f
or dword [ebp - 0x3eac], 0xffffffff
lea eax, [ebp - 0x674]
push eax
lea eax, [ebp - 0x3ea8]
push eax
call esi
mov eax, dword [ebp - 0x464]
or word [ebp - 0x36a4], 0xffff
mov dword [ebp - 0x36a8], eax
lea eax, [ebp - 0x24c]
push eax
lea eax, [ebp - 0x36a2]
push eax
call esi
push dword [ebp - 0x690]
push ebx
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x413bd3
xor eax, eax
mov word [ebp - 0xe98], bx
mov ecx, 0x1ff
lea edi, [ebp - 0xe96]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x34]
push eax
push 4
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
call sub.PSAPI.DLL_EnumProcessModules
test eax, eax
je 0x413ba1
mov edi, 0x400
push edi
lea eax, [ebp - 0x3ea8]
push eax
push dword [ebp - 0x24]
push dword [ebp - 4]
call sub.PSAPI.DLL_GetModuleBaseNameW
push edi
lea eax, [ebp - 0xe98]
push eax
push dword [ebp - 0x24]
push dword [ebp - 4]
call sub.PSAPI.DLL_GetModuleFileNameExW
lea eax, [ebp - 0xe98]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
lea eax, [ebp - 0xe98]
jne 0x413bbe
lea eax, [ebp - 0x674]
push eax
lea eax, [ebp - 0x2ea2]
push eax
call esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x413be3
lea eax, [ebp - 0x674]
push eax
lea eax, [ebp - 0x2ea2]
push eax
call esi
mov eax, dword [ebp - 0x450]
sub esp, 0x1810
mov edi, esp
mov dword [ebp - 0x26a0], eax
lea esi, [ebp - 0x3eac]
mov ecx, 0x604
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x41c700
call fcn.0041254c
call fcn.0040e8ce
cmp byte [eax + 2], bl
je 0x413c29
lea eax, [ebp - 0x3eac]
push eax
push dword [ebp - 0xc]
call fcn.00412b44
pop ecx
pop ecx
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
add dword [ebp - 8], 0x2000
cmp eax, dword [0x41c6fc]
jb 0x413ac4
lea eax, [ebp - 0x46c]
push eax
push dword [ebp - 0x1c]
call sub.KERNEL32.dll_Module32NextW
test eax, eax
jne 0x413a74
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x698]
push eax
push dword [ebp - 0x14]
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x4139f9
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0041214c
cmp dword [ebp - 0x28], ebx
mov dword [ebp - 0x34], eax
mov dword [ebp - 8], ebx
jbe 0x4140a1
mov esi, dword [ebp - 0x18]
movzx eax, byte [esi + 4]
cmp dword [ebp - 0x34], eax
jne 0x41408c
push dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_OpenProcess]
push ebx
push 0x450
call edi
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x413cd5
push dword [esi]
push ebx
push 0x40
call edi
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x41408c
push ebx
push ebx
push ebx
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
movzx eax, word [esi + 6]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x414083
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
push 0x40e42c
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x30], eax
je 0x41407a
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x40], ecx
mov ecx, dword [esi + 8]
push ebx
mov dword [ebp - 0x3c], ecx
lea ecx, [ebp - 0x10]
push ecx
push 8
lea ecx, [ebp - 0x40]
push ecx
push eax
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
mov byte [ebp - 0x444], bl
mov ecx, 0xff
lea edi, [ebp - 0x443]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
stosb byte es:[edi], al
lea eax, [ebp - 0x10]
push eax
push 0x400
lea eax, [ebp - 0x444]
push eax
push dword [ebp - 0x30]
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x414071
cmp word [ebp - 0x444], bx
lea eax, [ebp - 0x43c]
mov dword [ebp - 0x440], eax
jbe 0x413d9f
movzx eax, word [ebp - 0x444]
shr eax, 1
mov word [ebp + eax*2 - 0x43c], bx
push dword [ebp + 0xc]
mov esi, 0x1ff
push dword [ebp - 0x440]
mov word [ebp - 0xe98], bx
xor eax, eax
mov ecx, esi
lea edi, [ebp - 0xe96]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
call dword [sym.imp.SHLWAPI.dll_StrStrW]
mov ecx, dword [ebp - 0x440]
cmp eax, ecx
jne 0x413e10
movzx edx, word [ebp - 0x444]
mov eax, dword [ebp + 0x10]
shr edx, 1
cmp eax, edx
jae 0x413e00
lea eax, [ecx + eax*2]
push eax
push dword [ebp + 0x14]
lea eax, [ebp - 0xe98]
push 0x40e420
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
jmp 0x413e10
push dword [ebp + 0x14]
lea eax, [ebp - 0xe98]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0xe98]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x41406e
xor eax, eax
mov word [ebp - 0x269c], bx
mov ecx, esi
lea edi, [ebp - 0x269a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0xe98]
push eax
lea eax, [ebp - 0x269c]
push eax
call fcn.00411719
pop ecx
pop ecx
lea eax, [ebp - 0x269c]
push eax
lea eax, [ebp - 0x1e98]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x1e98]
push eax
call dword [sym.imp.USER32.dll_CharUpperW]
cmp dword [0x41c6fc], ebx
mov dword [ebp - 0x24], ebx
jbe 0x41406e
mov dword [ebp - 0x1c], ebx
mov eax, dword [0x41c6f4]
mov ecx, dword [ebp - 0x1c]
lea eax, [ecx + eax + 0x1800]
push eax
lea eax, [ebp - 0x1e98]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrW]
lea ecx, [ebp - 0x1e98]
cmp eax, ecx
jne 0x414055
push 7
pop ecx
mov esi, 0x40e400
lea edi, [ebp - 0x46ac]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
mov edx, 0x1f8
mov ecx, edx
lea edi, [ebp - 0x468e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 7
pop ecx
mov esi, 0x40e3e0
lea edi, [ebp - 0x1698]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
mov ecx, edx
lea edi, [ebp - 0x167a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x44]
push eax
push 4
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 4]
call sub.PSAPI.DLL_EnumProcessModules
test eax, eax
je 0x413f35
mov esi, 0x400
push esi
lea eax, [ebp - 0x46ac]
push eax
push dword [ebp - 0x38]
push dword [ebp - 4]
call sub.PSAPI.DLL_GetModuleBaseNameW
push esi
lea eax, [ebp - 0x1698]
push eax
push dword [ebp - 0x38]
push dword [ebp - 4]
call sub.PSAPI.DLL_GetModuleFileNameExW
jmp 0x413f8c
cmp dword [0x41c71c], ebx
mov dword [ebp - 0x14], ebx
jbe 0x413f8c
xor esi, esi
mov eax, dword [0x41c714]
mov edx, dword [ebp - 0x18]
add eax, esi
mov ecx, dword [eax]
cmp ecx, dword [edx]
jne 0x413f78
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
add eax, 4
push eax
lea eax, [ebp - 0x46ac]
push eax
call edi
mov eax, dword [0x41c714]
lea eax, [esi + eax + 4]
push eax
lea eax, [ebp - 0x1698]
push eax
call edi
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
add esi, 0x804
cmp eax, dword [0x41c71c]
jb 0x413f42
mov eax, dword [ebp - 8]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [ebp - 0x3eac], eax
lea eax, [ebp - 0x46ac]
push eax
lea eax, [ebp - 0x3ea8]
push eax
call esi
mov eax, dword [ebp - 0x18]
mov cx, word [eax + 6]
mov eax, dword [eax]
mov dword [ebp - 0x36a8], eax
push 0x40e3d8
lea eax, [ebp - 0x269c]
push eax
mov word [ebp - 0x36a4], cx
call dword [sym.imp.SHLWAPI.dll_StrStrW]
lea ecx, [ebp - 0x269c]
cmp eax, ecx
jne 0x413ffb
lea eax, [ebp - 0x2696]
push eax
lea eax, [ebp - 0x36a2]
push 0x40e3cc
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
jmp 0x41400b
lea eax, [ebp - 0x269c]
push eax
lea eax, [ebp - 0x36a2]
push eax
call esi
lea eax, [ebp - 0x1698]
push eax
lea eax, [ebp - 0x2ea2]
push eax
call esi
sub esp, 0x1810
mov edi, esp
lea esi, [ebp - 0x3eac]
mov ecx, 0x604
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x41c700
call fcn.0041254c
call fcn.0040e8ce
cmp byte [eax + 2], bl
je 0x414055
lea eax, [ebp - 0x3eac]
push eax
push dword [ebp - 0xc]
call fcn.00412b44
pop ecx
pop ecx
inc dword [ebp - 0x24]
mov eax, dword [ebp - 0x24]
add dword [ebp - 0x1c], 0x2000
cmp eax, dword [0x41c6fc]
jb 0x413e82
mov esi, dword [ebp - 0x18]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
add esi, 0x10
cmp eax, dword [ebp - 0x28]
mov dword [ebp - 0x18], esi
jb 0x413c9c
call fcn.0040e8ce
cmp byte [eax + 2], bl
je 0x4140b9
cmp dword [ebp - 0xc], ebx
je 0x4140b9
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret