Function at 0x516940
Capabilities:
Acquire debug privileges
Link many functions at runtime

Disassembly:
mov eax, 0x1850
call fcn.005e00d0
mov eax, dword [0x6aae14]
xor eax, esp
mov dword [esp + 0x184c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x185c]
push edi
xor ebx, ebx
xor eax, eax
lea edi, [ebp + 4]
mov dword [ebp], ebx
mov dword [edi], eax
push 0x207
mov dword [edi + 4], eax
lea eax, [esp + 0x1255]
push ebx
push eax
mov byte [esp + 0x125c], bl
call fcn.005dfd60
push 0x207
lea ecx, [esp + 0x1059]
push ebx
push ecx
mov byte [esp + 0x1060], bl
call fcn.005dfd60
mov eax, dword [0x74f8dc]
add esp, 0x18
mov dword [esp + 0xc], ebx
cmp eax, ebx
jne 0x5169cc
push 0x643dac
call fcn.004f4be0
mov dword [0x74f8dc], eax
cmp eax, ebx
je 0x516d97
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp dword [0x74f8d8], ebx
jne 0x5169ed
push 0x643d6c
push eax
call esi
mov dword [0x74f8d8], eax
mov eax, dword [0x74f8dc]
cmp dword [0x74f8d4], ebx
jne 0x516a07
push 0x643d58
push eax
call esi
mov dword [0x74f8d4], eax
mov eax, dword [0x74f8dc]
cmp dword [0x74f8d0], ebx
jne 0x516a21
push 0x643d2c
push eax
call esi
mov dword [0x74f8d0], eax
mov eax, dword [0x74f8dc]
cmp dword [0x74f8cc], ebx
jne 0x516a3b
push 0x643d40
push eax
call esi
mov dword [0x74f8cc], eax
mov eax, dword [0x74f8dc]
cmp dword [0x74f8c8], ebx
jne 0x516a50
push 0x643d10
push eax
call esi
mov dword [0x74f8c8], eax
cmp dword [0x74f8d8], ebx
je 0x516d7e
cmp dword [0x74f8d0], ebx
je 0x516d7e
cmp dword [0x74f8d4], ebx
je 0x516d7e
cmp dword [0x74f8cc], ebx
je 0x516d7e
push ebx
push 0x643ce8
call fcn.004e21c0
add esp, 8
lea edx, [esp + 0x2c]
push edx
push 0x1000
lea eax, [esp + 0x54]
push eax
call dword [0x74f8d8]
mov eax, dword [esp + 0x2c]
shr eax, 2
cmp eax, ebx
mov dword [esp + 0x28], eax
jle 0x516d96
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + ecx*4 + 0x4c]
push edx
push ebx
push 0x20410
mov byte [esp + 0x1058], bl
mov byte [esp + 0x1260], bl
call fcn.004e45c0
mov esi, eax
add esp, 0xc
mov dword [esp + 0x14], esi
cmp esi, ebx
je 0x516d69
lea eax, [esp + 0x20]
push eax
push esi
mov dword [esp + 0x28], 0x103
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [esp + 0x20], 0x103
jne 0x516d69
lea ecx, [esp + 0x30]
push ecx
push 4
lea edx, [esp + 0x2c]
push edx
push esi
call dword [0x74f8d4]
test eax, eax
je 0x516bee
mov ecx, dword [esp + 0x24]
push 0x208
lea eax, [esp + 0x1258]
push eax
push ecx
push esi
call dword [0x74f8d0]
mov eax, dword [esp + 0x24]
push 0x208
lea edx, [esp + 0x1050]
push edx
push eax
push esi
call dword [0x74f8cc]
cmp byte [esp + 0x104c], bl
je 0x516cb2
push ebx
push 1
lea ecx, [esp + 0x1054]
push ecx
call fcn.005127a0
lea edx, [esp + 0x104c]
push 0x7e
push edx
call fcn.005e0940
add esp, 8
test eax, eax
je 0x516cb2
push 0x3ff
lea eax, [esp + 0x1461]
push ebx
push eax
call fcn.005dfd60
add esp, 0xc
push 0x400
lea ecx, [esp + 0x1460]
push ecx
lea edx, [esp + 0x1054]
push edx
mov byte [esp + 0x1468], bl
call dword [0x6900e4]
dec eax
cmp eax, 0x102
ja 0x516cb2
lea eax, [esp + 0x145c]
push eax
lea ecx, [esp + 0x1050]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x516cb2
mov eax, dword [0x74f8c8]
cmp eax, ebx
je 0x516cb2
push 0x208
lea edx, [esp + 0x1050]
push edx
push esi
call eax
cmp byte [esp + 0x104c], bl
je 0x516cb2
lea eax, [esp + 0x104c]
push eax
call fcn.00502ab0
lea ecx, [esp + 0x104c]
push 0x7e
push ecx
call fcn.005e0940
add esp, 8
test eax, eax
je 0x516c91
push 0x3ff
lea edx, [esp + 0x1461]
push ebx
push edx
call fcn.005dfd60
add esp, 0xc
push 0x400
lea eax, [esp + 0x1460]
push eax
lea ecx, [esp + 0x1054]
push ecx
mov byte [esp + 0x1468], bl
call dword [0x6900e4]
dec eax
cmp eax, 0x206
ja 0x516c91
lea edx, [esp + 0x145c]
push edx
lea eax, [esp + 0x1050]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp byte [esp + 0x104c], bl
je 0x516cb2
lea ecx, [esp + 0x1254]
push ecx
lea edx, [esp + 0x1050]
push edx
call fcn.004e1490
add esp, 8
cmp byte [esp + 0x1254], bl
je 0x516d5b
lea eax, [esp + 0x1254]
push 0x5c
push eax
call fcn.005e0a00
lea ecx, [esp + 0x125c]
push 0x618e20
push ecx
call fcn.004dd620
add esp, 0x10
test eax, eax
jne 0x516d5b
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x24]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessTimes]
test eax, eax
je 0x516d4d
cmp dword [ebp], ebx
jne 0x516d25
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + eax*4 + 0x4c]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [ebp], ecx
mov dword [edi], edx
mov dword [edi + 4], eax
jmp 0x516d4d
lea ecx, [esp + 0x18]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jle 0x516d4d
mov edx, dword [esp + 0x10]
mov eax, dword [esp + edx*4 + 0x4c]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [ebp], eax
mov dword [edi], ecx
mov dword [edi + 4], edx
lea eax, [esp + 0x14]
push eax
call fcn.004dca10
mov esi, dword [esp + 0x14]
cmp esi, ebx
je 0x516d69
lea ecx, [esp + 0x14]
push ecx
call fcn.004dca10
mov eax, dword [esp + 0x10]
inc eax
cmp eax, dword [esp + 0x28]
mov dword [esp + 0x10], eax
jl 0x516ab6
jmp 0x516d96
mov dword [0x74f8d8], ebx
mov dword [0x74f8d0], ebx
mov dword [0x74f8d4], ebx
mov dword [0x74f8cc], ebx
pop esi
mov ecx, dword [esp + 0x1858]
pop edi
mov eax, ebp
pop ebp
pop ebx
xor ecx, esp
call fcn.005dfbbe
add esp, 0x1850
ret 4