Function at 0x46ca50
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x508
lea eax, [esp + 0x308]
lea ecx, [esp + 0x208]
lea edx, [esp + 0x104]
push ebx
mov ebx, dword [esp + 0x510]
push ebp
push esi
push edi
push 0
push eax
push ecx
push edx
push ebx
call fcn.004985ac
lea edi, [esp + 0x32c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x4d7050]
xor edi, edi
test eax, eax
jle 0x46cae0
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
xor esi, esi
mov ecx, dword [0x4d7054]
push ebx
lea edx, [esi + ecx]
push edx
call ebp
test eax, eax
je 0x46cd73
mov eax, dword [0x4d7050]
inc edi
add esi, 0x11c
cmp edi, eax
jl 0x46cabb
lea edi, [esp + 0x114]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x46cb28
lea eax, [esp + 0x418]
lea ecx, [esp + 0x318]
push eax
push ecx
mov ecx, dword [0x4d6de4]
lea edx, [esp + 0x220]
lea eax, [esp + 0x11c]
push edx
add ecx, 0x104
push eax
push ecx
call fcn.004985ac
add esp, 0x14
push 0x4d30b0
lea edx, [esp + 0x21c]
push ebx
lea eax, [esp + 0x11c]
push edx
lea ecx, [esp + 0x1c]
push eax
push ecx
call fcn.00496c32
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
add esp, 0x14
lea edx, [esp + 0x10]
push edx
call ebp
mov esi, eax
test esi, esi
jne 0x46cbf4
lea eax, [esp + 0x10]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push esi
lea ecx, [esp + 0x21c]
push esi
lea edx, [esp + 0x11c]
push ecx
lea eax, [esp + 0x1c]
push edx
push eax
call fcn.004985ac
mov edi, str.hdl_
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x22c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x4d30b0
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x230]
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x130]
push eax
lea edx, [esp + 0x30]
push ecx
push edx
call fcn.00496c32
add esp, 0x28
lea eax, [esp + 0x10]
push eax
call ebp
mov esi, eax
test esi, esi
je 0x46cdab
mov eax, dword [0x4d7050]
mov edx, dword [0x4d7054]
inc eax
mov dword [0x4d7050], eax
lea ecx, [eax + eax*8]
shl ecx, 3
sub ecx, eax
shl ecx, 2
push ecx
push edx
call fcn.00497980
mov edx, dword [0x4d7050]
mov edi, eax
mov dword [0x4d7054], edi
mov ecx, 0x47
lea ebp, [edx + edx*8]
xor eax, eax
shl ebp, 3
sub ebp, edx
add esp, 8
lea edi, [edi + ebp*4 - 0x11c]
push ebx
rep stosd dword es:[edi], eax
mov eax, dword [0x4d7050]
mov edx, dword [0x4d7054]
lea ecx, [eax + eax*8]
shl ecx, 3
sub ecx, eax
lea eax, [edx + ecx*4 - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [0x4d7050]
mov edx, dword [0x4d7054]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GetCmdNum
lea ecx, [eax + eax*8]
push esi
shl ecx, 3
sub ecx, eax
mov dword [edx + ecx*4 - 0x1c], esi
call edi
test eax, eax
je 0x46cd80
call eax
mov ecx, dword [0x4d7050]
push str.GetCmdTableHandle
push esi
lea edx, [ecx + ecx*8]
shl edx, 3
sub edx, ecx
mov ecx, dword [0x4d7054]
mov dword [ecx + edx*4 - 0x18], eax
call edi
test eax, eax
je 0x46cd80
call eax
mov ecx, dword [0x4d7050]
push str.ExecCommand
push esi
lea edx, [ecx + ecx*8]
shl edx, 3
sub edx, ecx
mov ecx, dword [0x4d7054]
mov dword [ecx + edx*4 - 0x14], eax
call edi
test eax, eax
je 0x46cd80
mov ecx, dword [0x4d7050]
push str.FindCmdNote
push esi
lea edx, [ecx + ecx*8]
shl edx, 3
sub edx, ecx
mov ecx, dword [0x4d7054]
mov dword [ecx + edx*4 - 0x10], eax
call edi
test eax, eax
je 0x46cd80
mov ecx, dword [0x4d7050]
push str.SendDataToHDL
push esi
lea edx, [ecx + ecx*8]
shl edx, 3
sub edx, ecx
mov ecx, dword [0x4d7054]
mov dword [ecx + edx*4 - 0xc], eax
call edi
mov ecx, dword [0x4d7050]
push str.UserPaint
push esi
lea edx, [ecx + ecx*8]
shl edx, 3
sub edx, ecx
mov ecx, dword [0x4d7054]
mov dword [ecx + edx*4 - 8], eax
call edi
mov ecx, dword [0x4d7050]
pop edi
pop esi
pop ebp
lea edx, [ecx + ecx*8]
pop ebx
shl edx, 3
sub edx, ecx
mov ecx, dword [0x4d7054]
mov dword [ecx + edx*4 - 4], eax
mov edx, dword [0x4d7050]
lea eax, [edx - 1]
add esp, 0x508
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x508
ret
mov eax, dword [0x4d7050]
mov edx, dword [0x4d7054]
dec eax
mov dword [0x4d7050], eax
lea ecx, [eax + eax*8]
shl ecx, 3
sub ecx, eax
shl ecx, 2
push ecx
push edx
call fcn.00497980
add esp, 8
mov dword [0x4d7054], eax
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x508
ret