Function at 0x41f990
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x104
mov eax, dword [0x542c54]
xor eax, esp
mov dword [esp + 0x100], eax
push ebx
xor ebx, ebx
push esi
xor eax, eax
push edi
push str.ntdll.dll
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], 3
mov dword [esp + 0x78], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
mov dword [esp + 0x2c], edi
cmp edi, ebx
je 0x41fa34
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.ZwQuerySystemInformation
push edi
call esi
push str.ZwOpenFile
push edi
mov dword [0x545470], eax
call esi
push str.ZwOpenSection
push edi
mov dword [0x54546c], eax
call esi
push str.RtlInitUnicodeString
push edi
mov dword [0x545468], eax
call esi
mov dword [0x545474], eax
cmp dword [0x545470], ebx
je 0x41fe08
cmp dword [0x54546c], ebx
je 0x41fe08
cmp dword [0x545468], ebx
je 0x41fe08
cmp dword [0x545474], ebx
je 0x41fe08
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.0041f5f0
push str.DeviceTcp
call fcn.0041f820
push str.DeviceUdp
mov dword [esp + 0x34], eax
call fcn.0041f820
push 0x4000
mov dword [esp + 0x34], eax
mov esi, 0x1000
call fcn.004cd70c
add esp, 0x14
push 0
push 0x4000
mov ebx, eax
push ebx
push 0x10
call dword [0x545470]
cmp eax, 0xc0000004
jne 0x41faf1
lea ebx, [ebx]
push ebx
call fcn.004cd871
add esi, esi
lea edi, [esi*4]
push edi
call fcn.004cd70c
add esp, 8
push 0
push edi
mov ebx, eax
push ebx
push 0x10
call dword [0x545470]
cmp eax, 0xc0000004
je 0x41fac0
mov edi, dword [esp + 0x2c]
xor eax, 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
cmp dword [ebx], eax
je 0x41fdb5
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edi, edi
mov dword [esp + 0x1c], eax
cmp dword [ebx], edi
jbe 0x41fdb1
lea esi, [ebx + 0xc]
mov edx, dword [esp + 0x1c]
cmp dword [esi - 8], edx
jne 0x41fb8d
mov ax, word [esp + 0x24]
cmp word [esi - 2], ax
jne 0x41fb5e
mov edx, dword [esi]
push 0x14
lea ecx, [esp + 0x44]
push ecx
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.0041f700
mov edx, dword [esp + 0x58]
add esp, 0x14
mov dword [esp + 0x30], edx
mov ax, word [esp + 0x20]
cmp word [esi - 2], ax
jne 0x41fb8d
mov edx, dword [esi]
push 0x14
lea ecx, [esp + 0x44]
push ecx
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.0041f700
mov edx, dword [esp + 0x58]
add esp, 0x14
mov dword [esp + 0x3c], edx
inc edi
add esi, 0x10
cmp edi, dword [ebx]
jb 0x41fb26
cmp dword [esp + 0x30], 0
je 0x41fdb1
cmp dword [esp + 0x3c], 0
je 0x41fdb1
cmp dword [ebx], 0
mov dword [esp + 0x1c], 0
jbe 0x41fdb1
lea edi, [ebx + 4]
nop
xor eax, 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 ecx, dword [edi + 8]
push 0x14
lea eax, [esp + 0x44]
push eax
push ecx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x28]
push eax
call fcn.0041f700
mov eax, dword [esp + 0x58]
add esp, 0x14
cmp eax, dword [esp + 0x30]
jne 0x41fc04
mov byte [esp + 0x13], 1
jmp 0x41fc13
cmp eax, dword [esp + 0x3c]
jne 0x41fd9d
mov byte [esp + 0x13], 2
mov eax, dword [esp + 0x50]
cmp eax, 1
je 0x41fc25
cmp eax, 2
jne 0x41fd9d
mov dword [esp + 0x28], 0
mov ecx, dword [edi]
push ecx
push 0
push 0x40
call dword [sym.imp.KERNEL32.dll_OpenProcess]
push 2
push 0
push 0
lea edx, [esp + 0x34]
push edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
movzx eax, word [edi + 6]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x28]
test esi, esi
je 0x41fd9d
push 0x80
lea ecx, [esp + 0x8c]
push 0
push ecx
mov dword [esp + 0x68], 0
call fcn.004cb5a0
add esp, 0xc
push 0
lea edx, [esp + 0x60]
push edx
push 0x80
lea eax, [esp + 0x94]
push eax
push 0x18
lea ecx, [esp + 0x74]
push ecx
push 0x210012
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x41fd92
mov esi, dword [ebp + 8]
movzx edx, word [esp + 0x94]
mov eax, dword [esp + 0x96]
mov ecx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], edx
mov eax, 0x78787879
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
je 0x41fd92
lea edx, [esp + 0x34]
push edx
mov ecx, esi
call fcn.0041f930
lea eax, [esp + 0x78]
push eax
mov ecx, esi
call fcn.0041f960
push eax
lea ecx, [esp + 0x38]
call fcn.0041f890
test al, al
je 0x41fd92
jmp 0x41fd20
lea ecx, [esp + 0x34]
call fcn.0041f8c0
movzx ecx, byte [esp + 0x13]
cmp dword [eax], ecx
jne 0x41fd65
lea ecx, [esp + 0x34]
call fcn.0041f8c0
movsx ecx, word [esp + 0x58]
cmp dword [eax + 0xc], ecx
jne 0x41fd65
lea ecx, [esp + 0x34]
call fcn.0041f8c0
mov edx, dword [esp + 0x54]
cmp dword [eax + 8], edx
jne 0x41fd65
lea ecx, [esp + 0x34]
call fcn.0041f8c0
mov ecx, dword [edi]
mov dword [eax + 4], ecx
push 0
lea edx, [esp + 0x84]
push edx
lea ecx, [esp + 0x3c]
call fcn.0041f8f0
lea eax, [esp + 0x78]
push eax
mov ecx, esi
call fcn.0041f960
push eax
lea ecx, [esp + 0x38]
call fcn.0041f890
test al, al
jne 0x41fd20
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
inc eax
add edi, 0x10
mov dword [esp + 0x1c], eax
cmp eax, dword [ebx]
jb 0x41fbc0
mov edi, dword [esp + 0x2c]
test ebx, ebx
je 0x41fdc2
push ebx
call fcn.004cd871
add esp, 4
mov edx, dword [esp + 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x20]
push eax
call esi
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.0041f6d0
add esp, 8
test edi, edi
je 0x41fdf3
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0x10c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004cb553
mov esp, ebp
pop ebp
ret
mov ebx, dword [esp + 0x54]
jmp 0x41fdb5