Function at 0x404252
Capabilities:
Create thread
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
and eax, 1
test eax, eax
je 0x404433
push 0x413194
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x416dd4], eax
cmp dword [0x416dd4], 0
jne 0x404284
xor eax, eax
jmp 0x404550
push 0x4131a4
mov ecx, dword [0x416dd4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417140], eax
push 0x4131bc
mov edx, dword [0x416dd4]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x41712c], eax
push 0x4131d8
mov eax, dword [0x416dd4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417124], eax
push 0x4131fc
mov ecx, dword [0x416dd4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417134], eax
push 0x413214
mov edx, dword [0x416dd4]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [fcn.00417130], eax
push 0x41322c
mov eax, dword [0x416dd4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417114], eax
push 0x413248
mov ecx, dword [0x416dd4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417108], eax
push 0x413264
mov edx, dword [0x416dd4]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417138], eax
push 0x413280
mov eax, dword [0x416dd4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x41713c], eax
push 0x413294
mov ecx, dword [0x416dd4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4170fc], eax
push 0x4132a8
mov edx, dword [0x416dd4]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417118], eax
push 0x4132c4
mov eax, dword [0x416dd4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417100], eax
push 0x4132d4
mov ecx, dword [0x416dd4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x41711c], eax
push 0x4132e4
mov edx, dword [0x416dd4]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x41710c], eax
push 0x4132f4
mov eax, dword [0x416dd4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417120], eax
push 0x413304
mov ecx, dword [0x416dd4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417110], eax
push 0x413318
mov edx, dword [0x416dd4]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417104], eax
push 0x41332c
mov eax, dword [0x416dd4]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417128], eax
push 0x413340
mov ecx, dword [0x416dd4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x417144], eax
mov edx, dword [ebp + 8]
and edx, 1
test edx, edx
je 0x40454b
mov eax, dword [ebp + 8]
and eax, 2
test eax, eax
je 0x40454b
mov ecx, dword [ebp + 8]
and ecx, 4
test ecx, ecx
je 0x40454b
call fcn.004041d0
push 0x10
call fcn.00408000
add esp, 4
mov edx, dword [ebp + 0xc]
mov dword [edx + 8], eax
mov eax, dword [ebp + 0xc]
cmp dword [eax + 8], 0
jne 0x404482
xor eax, eax
jmp 0x404550
push 0x413358
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
mov dword [edx + 4], eax
push 0x413370
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
mov dword [edx], eax
push 0x413388
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
mov dword [edx + 8], eax
push 0x4133a0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
mov dword [edx + 0xc], eax
lea eax, [ebp - 4]
push eax
push 4
push 0
push 0x403d7c
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 4], eax
mov edx, dword [ebp + 0xc]
cmp dword [edx + 4], 0
jne 0x404513
xor eax, eax
jmp 0x404550
lea eax, [ebp - 4]
push eax
push 0
mov ecx, dword [ebp + 0xc]
push ecx
push 0x403f13
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
push 2
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov edx, dword [ebp + 0xc]
cmp dword [edx], 0
jne 0x40454b
xor eax, eax
jmp 0x404550
mov eax, 1
mov esp, ebp
pop ebp
ret