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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x90
mov edi, ecx
mov eax, dword [0x5f3418]
xor eax, ebp
mov dword [esp + 0x88], eax
push 0x5e3f94
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov bl, 1
test eax, eax
jne 0x4d8a42
pcmpeqd xmm0, xmm0
lea esi, [esp + 0x70]
movdqa xmmword [esi], xmm0
mov dword [esi + 0x10], 0xffffffff
push esi
call fcn.004dacb0
add esp, 4
cmp byte [esi], 0
mov dword [esp + 0x2c], edi
je 0x4d8a6a
mov ecx, dword [edi]
lea esi, [edi + 4]
cmp ecx, esi
je 0x4d8a5a
cmp byte [esp + 0x70], 0
je 0x4d8aa8
mov dword [esp + 0x3c], ecx
lea eax, [ecx + 0x10]
lea ecx, [esp + 0x74]
lea edx, [esp + 0x58]
push eax
call fcn.0059bd20
add esp, 4
cmp byte [esp + 0x70], 0
je 0x4d8aa8
mov ecx, dword [esp + 0x58]
lea eax, [esp + 0x78]
mov dword [esp + 0x28], ecx
cmp ecx, eax
mov edx, dword [esp + 0x3c]
je 0x4d8a0d
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0x20]
mov dword [esp + 0x4c], eax
cmp ecx, eax
je 0x4d8a0d
lea eax, [edx + 0x1c]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x28]
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x54], ecx
mov ebx, dword [ecx]
cmp dword [edx + 0x24], 0
jne 0x4d8995
push 0
push 2
mov dword [esp + 0x24], ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
je 0x4d89c8
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4d89c8
mov ecx, dword [esp + 0x28]
movzx eax, byte [ecx + 0x1b]
test al, al
jns 0x4d86d2
mov ecx, dword [ecx + 0x14]
jmp 0x4d86d7
mov ecx, eax
and ecx, 0x7f
cmp ecx, 4
je 0x4d872a
cmp ecx, 5
jne 0x4d89c8
mov ecx, dword [esp + 0x18]
test al, al
jns 0x4d86f3
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
cmp word [ecx], 0x45
jne 0x4d89c8
cmp word [ecx + 2], 0x76
jne 0x4d89c8
cmp word [ecx + 4], 0x65
jne 0x4d89c8
cmp word [ecx + 6], 0x6e
jne 0x4d89c8
cmp word [ecx + 8], 0x74
je 0x4d8763
jmp 0x4d89c8
mov ecx, dword [esp + 0x18]
test al, al
jns 0x4d8738
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
cmp word [ecx], 0x46
jne 0x4d89c8
cmp word [ecx + 2], 0x69
jne 0x4d89c8
cmp word [ecx + 4], 0x6c
jne 0x4d89c8
cmp word [ecx + 6], 0x65
jne 0x4d89c8
mov eax, dword [edi + 0xc]
inc eax
cmp eax, 2
jb 0x4d89c8
mov dword [esp + 0x40], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessorNumber]
mov dword [esp + 0x20], eax
xor ebx, ebx
inc ebx
mov esi, ebx
mov ecx, eax
shl esi, cl
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov dword [esp + 0xc], 0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
mov dword [esp + 0x30], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x38], 0
xor edx, edx
mov dword [esp + 0x24], ecx
mov esi, ebx
shl esi, cl
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
bt eax, ecx
mov ecx, dword [esp + 0x24]
jae 0x4d8932
cmp ecx, dword [esp + 0x20]
je 0x4d87f0
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
mov dword [esp + 0x58], 0
mov ecx, 0xfffffff0
mov dword [esp + 0x50], ecx
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call ebx
mov edi, eax
mov eax, dword [esp + 0x2c]
mov esi, dword [eax + 0xc]
call ebx
xor ecx, ecx
push ecx
push ecx
push ecx
lea ecx, [esp + 0x64]
push ecx
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov edx, eax
test eax, eax
je 0x4d8927
mov esi, dword [esp + 0x58]
mov eax, dword [esp + 0x1c]
cmp esi, eax
je 0x4d8857
mov ebx, dword [esp + 0xc]
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x4d8866
mov dword [ecx], esi
add ecx, 4
mov dword [esp + 0x14], ecx
jmp 0x4d8910
mov cl, 1
mov dword [esp + 0x38], ecx
mov ebx, dword [esp + 0xc]
jmp 0x4d8910
mov dword [esp + 0x48], esi
sub ebx, dword [esp + 0x10]
mov edi, ebx
sar edi, 2
lea eax, [edi + 1]
cmp eax, 0x40000000
jae 0x4d8aaa
mov esi, ebx
sar esi, 1
cmp esi, eax
cmovbe esi, eax
cmp ebx, 0x7ffffffc
mov eax, 0x3fffffff
cmovae esi, eax
test esi, esi
mov dword [esp + 0x34], edx
je 0x4d88c2
cmp esi, 0x40000000
jae 0x4d8aaf
lea eax, [esi*4]
push eax
call fcn.00510d64
add esp, 4
mov dword [esp + 0xc], eax
jmp 0x4d88ca
mov dword [esp + 0xc], 0
mov edx, dword [esp + 0xc]
lea eax, [edx + edi*4]
add eax, 4
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x48]
mov dword [eax - 4], ecx
push ebx
mov edi, dword [esp + 0x14]
push edi
push edx
mov ebx, edx
call fcn.00518c30
add esp, 0xc
lea ebx, [ebx + esi*4]
test edi, edi
je 0x4d8900
push edi
call fcn.0050fc7c
add esp, 4
mov eax, dword [esp + 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x34]
mov dword [esp + 0xc], ebx
mov ecx, dword [esp + 0x50]
test ecx, ecx
je 0x4d8927
inc ecx
cmp dword [esp + 0x58], eax
jb 0x4d87fd
mov edi, dword [esp + 0x2c]
xor ebx, ebx
inc ebx
mov ecx, dword [esp + 0x24]
inc ecx
cmp ecx, 0x20
mov eax, 0
cmove ecx, eax
mov eax, ecx
cmp ecx, dword [esp + 0x20]
je 0x4d8956
test edx, edx
je 0x4d8956
mov eax, dword [esp + 0x38]
and al, 1
je 0x4d87bf
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push dword [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
mov eax, dword [esp + 0x10]
mov esi, eax
cmp eax, dword [esp + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4d8986
push dword [esi]
call ebx
add esi, 4
cmp esi, dword [esp + 0x14]
jne 0x4d8979
mov eax, dword [esp + 0x10]
test eax, eax
mov esi, dword [esp + 0x40]
je 0x4d89c8
push eax
jmp 0x4d89c0
xor eax, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x60], eax
lea eax, [esp + 0x58]
push eax
push ebx
call fcn.005a2810
add esp, 8
test al, al
jne 0x4d89df
cmp byte [esp + 0x63], 0
jns 0x4d89c8
push dword [esp + 0x58]
call fcn.0050fc7c
add esp, 4
mov ecx, dword [esp + 0x54]
add ecx, 4
cmp ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x3c]
jne 0x4d8688
jmp 0x4d8a0d
mov ecx, dword [esp + 0x44]
lea eax, [esp + 0x58]
push eax
call fcn.0059bde0
test eax, eax
je 0x4d89b5
cmp byte [esp + 0x63], 0
jns 0x4d8698
push dword [esp + 0x58]
call fcn.0050fc7c
add esp, 4
jmp 0x4d8698
test edx, edx
je 0x4d8ab4
mov ecx, dword [edx + 4]
test ecx, ecx
je 0x4d8a26
mov eax, ecx
mov ecx, dword [ecx]
test ecx, ecx
jne 0x4d8a1c
jmp 0x4d8a2f
mov eax, dword [edx + 8]
cmp dword [eax], edx
mov edx, eax
jne 0x4d8a26
mov ecx, eax
cmp eax, esi
jne 0x4d861a
mov bl, 1
cmp byte [esp + 0x70], 0
jne 0x4d8a5a
mov ecx, dword [esp + 0x88]
xor ecx, ebp
call fcn.00512ee3
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea ecx, [esp + 0x74]
push dword [ecx + 4]
call fcn.0059b9b0
mov bl, 1
jmp 0x4d8a42
lea edi, [esp + 0x58]
push edi
call fcn.004daf90
add esp, 4
lea ecx, [esp + 0x70]
mov edx, edi
call fcn.0059b8d0
cmp byte [edi], 0
jne 0x4d8a9a
cmp byte [esp + 0x70], 0
mov edi, dword [esp + 0x2c]
jne 0x4d860d
xor ebx, ebx
jmp 0x4d8a42
lea ecx, [esp + 0x5c]
push dword [ecx + 4]
call fcn.0059b9b0
jmp 0x4d8a87
ud2
call fcn.0052ce30
call fcn.00549f00
int3