Function at 0x405980
Capabilities:
Link many functions at runtime

Disassembly:
mov edx, dword [0x41c25c]
sub esp, 0x434
test edx, edx
push ebx
push ebp
push esi
push edi
je 0x405ce7
mov eax, dword [edx]
test eax, eax
je 0x405ce7
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x4059b9
lea esp, [esp]
mov eax, ecx
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x4059b0
cmp dword [eax], 0
je 0x405ce7
call fcn.00407a30
mov ecx, dword [edx]
test ecx, ecx
je 0x4059df
mov eax, dword [ecx + 4]
test eax, eax
je 0x4059dd
mov ecx, eax
mov eax, dword [ecx + 4]
test eax, eax
jne 0x4059d4
mov ecx, dword [ecx]
mov eax, dword [ecx + 0x34]
xor edx, edx
xor esi, esi
test eax, eax
je 0x405a0a
lea ebx, [ebx]
mov ecx, dword [eax + 0x10048]
add edx, ecx
mov ecx, dword [eax + 0x1004c]
mov eax, dword [eax + 0x10050]
adc esi, ecx
test eax, eax
jne 0x4059f0
push 0
push 0x64
push esi
push edx
call fcn.00408f30
push 0
push 0x40000000
push edx
push eax
call fcn.00408e80
mov edi, edx
lea edx, [esp + 0x24]
push edx
mov esi, eax
mov eax, dword [0x41c288]
push 0x2c
call fcn.00402950
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x3c], ebp
je 0x405ce7
push 0
push 0x64
push edi
push esi
call fcn.00408da0
push ebx
push ecx
push edx
push eax
mov eax, dword [0x41a014]
push eax
lea ecx, [esp + 0x54]
push ebp
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
lea edx, [esp + 0x40]
push edx
call fcn.00407a30
add esp, 4
lea eax, [esp + 0x24]
xor ebx, ebx
push eax
mov eax, dword [0x41c288]
push 0x29
mov dword [esp + 0x38], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x20], ebx
call fcn.00402950
lea ecx, [esp + 0x24]
mov edi, eax
mov eax, dword [0x41c288]
push ecx
push 0x2a
mov dword [esp + 0x40], edi
call fcn.00402950
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x30], eax
mov eax, dword [0x41c288]
push 0x2b
mov byte [esp + 0x1f], bl
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call fcn.00402950
mov ebp, eax
cmp ebp, ebx
je 0x405bd1
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
push ecx
mov eax, ebp
call fcn.00403950
mov esi, dword [esp + 0x20]
test esi, esi
je 0x405aff
cmp dword [esp + 0x1c], ebx
jle 0x405aff
mov eax, dword [esi]
jmp 0x405b01
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x405bbd
test esi, esi
je 0x405b22
cmp dword [esp + 0x1c], 1
jle 0x405b22
mov eax, dword [esi + 4]
jmp 0x405b24
xor eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
push edi
call ebx
test esi, esi
mov dword [esp + 0x30], eax
je 0x405b42
cmp dword [esp + 0x1c], 2
jle 0x405b42
mov eax, dword [esi + 8]
jmp 0x405b44
xor eax, eax
push eax
push edi
call ebx
test esi, esi
mov dword [esp + 0x28], eax
je 0x405b5c
cmp dword [esp + 0x1c], 3
jle 0x405b5c
mov eax, dword [esi + 0xc]
jmp 0x405b5e
xor eax, eax
push eax
push edi
call ebx
test esi, esi
mov dword [esp + 0x34], eax
je 0x405b76
cmp dword [esp + 0x1c], 4
jle 0x405b76
mov eax, dword [esi + 0x10]
jmp 0x405b78
xor eax, eax
push eax
push edi
call ebx
test esi, esi
mov dword [esp + 0x18], eax
je 0x405b90
cmp dword [esp + 0x1c], 5
jle 0x405b90
mov esi, dword [esi + 0x14]
jmp 0x405b92
xor esi, esi
push esi
push edi
call ebx
cmp dword [esp + 0x30], 0
mov ebx, eax
je 0x405bbd
cmp dword [esp + 0x28], 0
je 0x405bbd
cmp dword [esp + 0x34], 0
je 0x405bbd
cmp dword [esp + 0x18], 0
je 0x405bbd
test ebx, ebx
je 0x405bbd
mov byte [esp + 0x17], 1
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [esp + 0x38]
lea esi, [esp + 0x1c]
call fcn.00403a10
test edi, edi
je 0x405cd3
cmp dword [esp + 0x2c], 0
je 0x405cd3
cmp byte [esp + 0x17], 0
je 0x405cd3
push 0
push 0
push 0
push 0
push 0x40927e
call dword [esp + 0x48]
mov ebp, eax
test ebp, ebp
je 0x405cb4
push 0
push 0
push 3
push 0
push 0
push 0x1bb
push edi
push ebp
call ebx
mov esi, eax
test esi, esi
je 0x405c9e
mov eax, dword [esp + 0x2c]
push 0
push 0x80800000
push 0
lea edx, [esp + 0x4c]
push edx
push 0
push eax
push 0
push esi
call dword [esp + 0x50]
mov edi, eax
test edi, edi
je 0x405c7f
push 0
push 0
push 0
push 0
push edi
call dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00407a30
add esp, 4
push edi
call dword [esp + 0x1c]
push esi
call dword [esp + 0x1c]
mov edi, dword [esp + 0x38]
push ebp
call dword [esp + 0x1c]
jmp 0x405cc3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00407a30
add esp, 4
push esi
call dword [esp + 0x1c]
mov edi, dword [esp + 0x38]
push ebp
call dword [esp + 0x1c]
jmp 0x405cc3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00407a30
add esp, 4
push ebp
call dword [esp + 0x1c]
jmp 0x405cc3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00407a30
add esp, 4
mov eax, edi
call fcn.00404c70
mov eax, dword [esp + 0x2c]
call fcn.00404c70
mov ecx, dword [esp + 0x3c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x434
ret