Function at 0x515670
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x414
mov eax, dword [0x6aae14]
xor eax, esp
mov dword [esp + 0x410], eax
push ebx
push ebp
mov ebp, dword [esp + 0x424]
xor ebx, ebx
push edi
mov edi, dword [esp + 0x42c]
mov dword [esp + 0xc], ebx
cmp ebp, ebx
je 0x5156a2
mov byte [ebp], bl
cmp edi, ebx
je 0x5156a8
mov byte [edi], bl
mov eax, dword [0x74f8b8]
cmp eax, ebx
jne 0x5156cb
push 0x643dac
call fcn.004f4be0
mov dword [0x74f8b8], eax
cmp eax, ebx
jne 0x5156cb
xor eax, eax
jmp 0x515933
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp dword [0x74f8b4], ebx
jne 0x5156ec
push 0x643d6c
push eax
call esi
mov dword [0x74f8b4], eax
mov eax, dword [0x74f8b8]
cmp dword [0x74f8b0], ebx
jne 0x515706
push 0x643d58
push eax
call esi
mov dword [0x74f8b0], eax
mov eax, dword [0x74f8b8]
cmp dword [0x74f8ac], ebx
jne 0x515720
push 0x643d2c
push eax
call esi
mov dword [0x74f8ac], eax
mov eax, dword [0x74f8b8]
cmp dword [0x74f8a8], ebx
jne 0x51573a
push 0x643d40
push eax
call esi
mov dword [0x74f8a8], eax
mov eax, dword [0x74f8b8]
cmp dword [0x74f8a4], ebx
jne 0x51574f
push 0x643d10
push eax
call esi
mov dword [0x74f8a4], eax
cmp dword [0x74f8b4], ebx
je 0x515918
cmp dword [0x74f8ac], ebx
je 0x515918
cmp dword [0x74f8b0], ebx
je 0x515918
cmp dword [0x74f8a8], ebx
je 0x515918
cmp ebp, ebx
je 0x515930
cmp edi, ebx
je 0x515930
mov eax, dword [esp + 0x428]
cmp eax, ebx
jne 0x5157a0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp eax, 4
jbe 0x515930
cmp eax, 0xffffffff
je 0x515930
push eax
push ebx
push 0x410
call fcn.004e45c0
mov esi, eax
add esp, 0xc
mov dword [esp + 0x18], esi
cmp esi, ebx
je 0x515930
lea eax, [esp + 0x1c]
push eax
push 4
lea ecx, [esp + 0x1c]
push ecx
push esi
call dword [0x74f8b0]
test eax, eax
je 0x51588d
mov edx, dword [esp + 0x14]
push 0x104
push ebp
push edx
push esi
call dword [0x74f8ac]
mov eax, dword [esp + 0x14]
push 0x104
push edi
push eax
push esi
call dword [0x74f8a8]
cmp byte [edi], bl
je 0x515908
push ebx
push 1
push edi
mov dword [esp + 0x1c], 1
call fcn.005127a0
push 0x7e
push edi
call fcn.005e0940
add esp, 8
test eax, eax
je 0x515908
push 0x3ff
lea ecx, [esp + 0x25]
push ebx
push ecx
call fcn.005dfd60
add esp, 0xc
push 0x400
lea edx, [esp + 0x24]
push edx
push edi
mov byte [esp + 0x2c], bl
call dword [0x6900e4]
dec eax
cmp eax, 0x102
ja 0x515908
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x18]
push ecx
call fcn.004dca10
mov eax, dword [esp + 0x10]
jmp 0x515932
mov eax, dword [0x74f8a4]
cmp eax, ebx
je 0x515908
push 0x104
push edi
push esi
call eax
cmp byte [edi], bl
je 0x515908
push edi
mov dword [esp + 0x14], 1
call fcn.00502ab0
push 0x7e
push edi
call fcn.005e0940
add esp, 8
test eax, eax
je 0x5158fa
push 0x3ff
lea ecx, [esp + 0x25]
push ebx
push ecx
call fcn.005dfd60
add esp, 0xc
push 0x400
lea edx, [esp + 0x24]
push edx
push edi
mov byte [esp + 0x2c], bl
call dword [0x6900e4]
dec eax
cmp eax, 2
ja 0x5158fa
lea eax, [esp + 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp byte [edi], bl
je 0x515908
push ebp
push edi
call fcn.004e1490
add esp, 8
lea ecx, [esp + 0x18]
push ecx
call fcn.004dca10
mov eax, dword [esp + 0x10]
jmp 0x515932
mov dword [0x74f8b4], ebx
mov dword [0x74f8ac], ebx
mov dword [0x74f8b0], ebx
mov dword [0x74f8a8], ebx
xor eax, eax
pop esi
mov ecx, dword [esp + 0x41c]
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.005dfbbe
add esp, 0x414
ret 0xc