Function at 0x50c170
Capabilities:
Create thread

Disassembly:
sub esp, 0xa50
mov eax, dword [0x6aae14]
xor eax, esp
mov dword [esp + 0xa4c], eax
push ebx
push ebp
mov ebp, dword [esp + 0xa5c]
push edi
mov edi, dword [esp + 0xa64]
xor ebx, ebx
push 0x207
lea eax, [esp + 0x23d]
push ebx
push eax
mov dword [esp + 0x34], edi
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x244], bl
call fcn.005dfd60
push 0x207
lea ecx, [esp + 0x659]
push ebx
push ecx
mov byte [esp + 0x660], bl
call fcn.005dfd60
push 0x207
lea edx, [esp + 0x4d]
push ebx
push edx
mov byte [esp + 0x54], bl
call fcn.005dfd60
push 0x207
lea eax, [esp + 0x879]
push ebx
push eax
mov byte [esp + 0x880], bl
call fcn.005dfd60
push 0x648564
push ebp
call fcn.004e2be0
add esp, 0x38
test eax, eax
jne 0x50c22b
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa4c]
xor ecx, esp
call fcn.005dfbbe
add esp, 0xa50
ret
push esi
cmp dword [esp + 0xa6c], ebx
je 0x50c30b
push 0x208
lea ecx, [esp + 0x240]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x208
lea edx, [esp + 0x858]
push edx
lea eax, [esp + 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x50c282
lea ecx, [esp + 0x854]
push ecx
lea edx, [esp + 0x240]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ebx
lea eax, [esp + 0x650]
push eax
lea ecx, [esp + 0x244]
push ecx
call fcn.004ec3a0
lea edx, [esp + 0x658]
push ebx
push edx
call fcn.004e8c10
lea eax, [esp + 0x660]
push eax
lea ecx, [esp + 0x4c]
push 0x64d03c
push ecx
call fcn.005dfb23
push 1
push ebx
push ebx
push ebx
lea edx, [esp + 0x64]
push ebx
push edx
call fcn.004e8950
add esp, 0x38
test eax, eax
jne 0x50c30b
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x60ef34
lea eax, [esp + 0x38]
push eax
call esi
push ebp
lea ecx, [esp + 0x38]
push ecx
call esi
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push ebx
push 1
lea edx, [esp + 0x4c]
push edx
push ebx
call fcn.005069e0
mov eax, 1
jmp 0x50c461
push ebp
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp + 0x30], eax
cmp eax, 0x20
jbe 0x50c44d
push 0x64d028
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x50c425
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0x18]
push eax
push ebx
push 0x4d8140
mov dword [esp + 0x1c], 0x80004005
mov edi, 0x1e
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], esi
call fcn.005e07ac
add esp, 0xc
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
jne 0x50c382
call esi
mov esi, eax
jmp 0x50c3be
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esp + 0x1c], ebx
jne 0x50c3a0
mov edi, edi
push 1
call esi
cmp dword [esp + 0x1c], ebx
je 0x50c390
lea ebx, [ebx]
cmp dword [esp + 0x18], ebx
jne 0x50c3b8
push 0x3e8
call esi
sub edi, 1
jne 0x50c3a0
cmp dword [esp + 0x18], ebx
je 0x50c3cc
mov ecx, dword [esp + 0x28]
mov esi, ecx
cmp esi, ebx
jl 0x50c3d0
mov dword [esp + 0x14], 1
jmp 0x50c435
mov esi, dword [esp + 0x10]
push 0x207
lea edx, [esp + 0x449]
push ebx
push edx
mov byte [esp + 0x450], bl
call fcn.005dfd60
mov edi, dword [esp + 0x38]
add esp, 0xc
cmp edi, ebx
je 0x50c435
push esi
push ebp
lea eax, [esp + 0x44c]
push str.ERROR____Call_to_DllUnregisterServer__s_failed_with__d_value_
push eax
mov byte [esp + 0x454], bl
call fcn.005dfb23
push ebx
lea ecx, [esp + 0x458]
push ecx
push 0x60c990
call edi
add esp, 0x1c
jmp 0x50c435
cmp edi, ebx
je 0x50c435
push ebx
push ebp
push str.ERROR____Unable_to_get_entrypoint_of_DllUnregisterServer__s__n
call edi
add esp, 0xc
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 1
push ebp
call fcn.004ea7e0
add esp, 8
jmp 0x50c45d
cmp edi, ebx
je 0x50c45d
push ebx
push ebp
push str.ERROR____Load_library_on__s_failed__n
call edi
add esp, 0xc
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0xa5c]
pop esi
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.005dfbbe
add esp, 0xa50
ret