Function at 0x50e2d8
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
mov ebx, 0x56793c
mov dword [ebp - 4], 0xffffffff
cmp dword [0x56783c], 0
jne 0x50e307
push 0x308
call sub.kernel32.dll_SetLastError_1
xor eax, eax
jmp 0x50e822
call fcn.0050d928
and eax, 2
xor edx, edx
cmp edx, 0
jne 0x50e32c
cmp eax, 0
jne 0x50e32c
push 0x78
call sub.kernel32.dll_SetLastError_1
xor eax, eax
jmp 0x50e822
push 1
push 3
call fcn.0050f148
add esp, 8
test eax, eax
jne 0x50e343
xor eax, eax
jmp 0x50e822
cmp dword [0x567898], 0
jne 0x50e3ad
lea edx, [ebx + 0x8d4]
push edx
lea ecx, [ebx + 0x8ca]
push ecx
call sub.kernel32.dll_LoadLibraryA
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x567898], eax
test eax, eax
jne 0x50e3ad
push 1
lea edx, [ebx + 0x8ea]
push edx
call fcn.0050f360
add esp, 8
lea ecx, [ebx + 0x950]
lea eax, [ebx + 0x93a]
lea edx, [ebx + 0x922]
push ecx
push eax
push edx
call fcn.0050f140
add esp, 0xc
push 0x47e
call sub.kernel32.dll_SetLastError_1
xor ecx, ecx
jmp 0x50e628
cmp dword [0x56789c], 0
jne 0x50e417
lea eax, [ebx + 0x965]
push eax
lea edx, [ebx + 0x95a]
push edx
call sub.kernel32.dll_LoadLibraryA
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x56789c], eax
test eax, eax
jne 0x50e417
push 2
lea edx, [ebx + 0x977]
push edx
call fcn.0050f360
add esp, 8
lea ecx, [ebx + 0x9d9]
lea eax, [ebx + 0x9c7]
lea edx, [ebx + 0x9af]
push ecx
push eax
push edx
call fcn.0050f140
add esp, 0xc
push 0x47e
call sub.kernel32.dll_SetLastError_1
xor ecx, ecx
jmp 0x50e628
cmp dword [0x5678a0], 0
jne 0x50e481
lea eax, [ebx + 0x9ef]
push eax
lea edx, [ebx + 0x9e4]
push edx
call sub.kernel32.dll_LoadLibraryA
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x5678a0], eax
test eax, eax
jne 0x50e481
push 3
lea edx, [ebx + 0x9fe]
push edx
call fcn.0050f360
add esp, 8
lea ecx, [ebx + 0xa5d]
lea eax, [ebx + 0xa4e]
lea edx, [ebx + 0xa36]
push ecx
push eax
push edx
call fcn.0050f140
add esp, 0xc
push 0x47e
call sub.kernel32.dll_SetLastError_1
xor ecx, ecx
jmp 0x50e628
cmp dword [0x5678a4], 0
jne 0x50e4eb
lea eax, [ebx + 0xa73]
push eax
lea edx, [ebx + 0xa68]
push edx
call sub.kernel32.dll_LoadLibraryA
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x5678a4], eax
test eax, eax
jne 0x50e4eb
push 4
lea edx, [ebx + 0xa82]
push edx
call fcn.0050f360
add esp, 8
lea ecx, [ebx + 0xae1]
lea eax, [ebx + 0xad2]
lea edx, [ebx + 0xaba]
push ecx
push eax
push edx
call fcn.0050f140
add esp, 0xc
push 0x47e
call sub.kernel32.dll_SetLastError_1
xor ecx, ecx
jmp 0x50e628
cmp dword [0x5678a8], 0
jne 0x50e555
lea eax, [ebx + 0xaf7]
push eax
lea edx, [ebx + 0xaec]
push edx
call sub.kernel32.dll_LoadLibraryA
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x5678a8], eax
test eax, eax
jne 0x50e555
push 5
lea edx, [ebx + 0xb08]
push edx
call fcn.0050f360
add esp, 8
lea ecx, [ebx + 0xb69]
lea eax, [ebx + 0xb58]
lea edx, [ebx + 0xb40]
push ecx
push eax
push edx
call fcn.0050f140
add esp, 0xc
push 0x47e
call sub.kernel32.dll_SetLastError_1
xor ecx, ecx
jmp 0x50e628
cmp dword [0x5678ac], 0
jne 0x50e5bc
lea eax, [ebx + 0xb7f]
push eax
lea edx, [ebx + 0xb74]
push edx
call sub.kernel32.dll_LoadLibraryA
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x5678ac], eax
test eax, eax
jne 0x50e5bc
push 6
lea edx, [ebx + 0xb8e]
push edx
call fcn.0050f360
add esp, 8
lea ecx, [ebx + 0xbed]
lea eax, [ebx + 0xbde]
lea edx, [ebx + 0xbc6]
push ecx
push eax
push edx
call fcn.0050f140
add esp, 0xc
push 0x47e
call sub.kernel32.dll_SetLastError_1
xor ecx, ecx
jmp 0x50e628
cmp dword [0x5678b0], 0
jne 0x50e623
lea eax, [ebx + 0xc03]
push eax
lea edx, [ebx + 0xbf8]
push edx
call sub.kernel32.dll_LoadLibraryA
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x5678b0], eax
test eax, eax
jne 0x50e623
push 7
lea edx, [ebx + 0xc13]
push edx
call fcn.0050f360
add esp, 8
lea ecx, [ebx + 0xc73]
lea eax, [ebx + 0xc63]
lea edx, [ebx + 0xc4b]
push ecx
push eax
push edx
call fcn.0050f140
add esp, 0xc
push 0x47e
call sub.kernel32.dll_SetLastError_1
xor ecx, ecx
jmp 0x50e628
mov ecx, 1
test ecx, ecx
jne 0x50e633
xor eax, eax
jmp 0x50e822
cmp dword [ebp + 8], 0xffffffff
je 0x50e647
push 0x57
call sub.kernel32.dll_SetLastError_1
xor eax, eax
jmp 0x50e822
mov edx, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], 4
xor eax, eax
cmp dword [ebp - 8], 0xffffffff
mov esi, eax
jne 0x50e66d
mov edx, 1
jmp 0x50e71a
cmp dword [0x5678c0], 0
je 0x50e67f
cmp dword [0x5678c4], 0
jne 0x50e68e
cmp dword [ebp - 8], 0
sete dl
and edx, 1
jmp 0x50e71a
push 0
call sub.kernel32.dll_SetLastError_1
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0xc]
push ecx
push 8
mov eax, dword [ebp - 8]
push eax
push 0
call dword [0x5678c0]
mov esi, eax
test esi, esi
jne 0x50e6c8
call sub.kernel32.dll_GetLastError_1
push eax
lea edx, [ebx + 0xcb7]
push edx
call fcn.0050f140
add esp, 8
jmp 0x50e70e
test esi, esi
je 0x50e70e
cmp dword [ebp - 0xc], 0
je 0x50e70e
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx]
push eax
lea edx, [ebx + 0xcde]
push edx
call fcn.0050f140
add esp, 8
mov edi, dword [ebp - 0xc]
mov edi, dword [edi]
cmp edi, 4
je 0x50e705
cmp edi, 6
je 0x50e705
cmp edi, 7
je 0x50e705
cmp edi, 8
je 0x50e705
cmp edi, 9
jne 0x50e709
xor esi, esi
jmp 0x50e70e
mov esi, 1
mov eax, dword [ebp - 0xc]
push eax
call dword [0x5678c4]
mov edx, esi
test edx, edx
jne 0x50e73f
mov ecx, dword [ebp + 8]
push ecx
lea eax, [ebx + 0xd18]
push eax
call fcn.0050f360
add esp, 8
push 2
call sub.kernel32.dll_SetLastError_1
xor eax, eax
jmp 0x50e822
mov dword [ebp - 0x14], 0xffffffff
lea edx, [ebp - 0x14]
push edx
push 0
push 0x2000000
call sub.kernel32.dll_GetCurrentThread
push eax
call sub.advapi32.dll_OpenThreadToken
test eax, eax
je 0x50e788
mov ecx, dword [ebp - 0x14]
push ecx
call sub.kernel32.dll_CloseHandle_1
push 0x55f
call sub.kernel32.dll_SetLastError_1
jmp 0x50e781
xor eax, eax
jmp 0x50e822
push 1
lea edx, [ebx + 0xd8a]
push edx
call fcn.0050f418
add esp, 8
test eax, eax
jne 0x50e7ab
push 0x522
call sub.kernel32.dll_SetLastError_1
xor eax, eax
jmp 0x50e822
cmp dword [0x567840], 0
je 0x50e7bb
mov eax, 1
jmp 0x50e822
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 4]
push ecx
call fcn.0050f56c
add esp, 8
test eax, eax
je 0x50e816
push 0
push 0x50dcd4
mov eax, dword [ebp + 8]
push eax
call fcn.0050e118
add esp, 0xc
mov esi, eax
mov eax, dword [ebp + 8]
push eax
lea edx, [ebp - 4]
push edx
call fcn.0050f56c
add esp, 8
push esi
call sub.kernel32.dll_SetLastError_1
push esi
lea ecx, [ebx + 0xdd0]
push ecx
call fcn.0050f140
add esp, 8
test esi, esi
sete al
and eax, 1
jmp 0x50e822
push 0x4ec
call sub.kernel32.dll_SetLastError_1
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4