Function at 0x580b58
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff60
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x90], ecx
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x88], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
call fcn.00404cfc
lea esi, [ebp - 0x10]
xor eax, eax
push ebp
push 0x5810fd
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x654c88], 0
jne 0x580c7e
push 0x58110c
call sub.KERNEL32.dll_LoadLibraryA
mov dword [0x654c88], eax
cmp dword [0x654c88], 0
jne 0x580bd6
mov eax, dword [esi]
mov byte [eax + 0x15c], 1
jmp 0x5810d2
push 0x581118
mov eax, dword [0x654c88]
push eax
call sub.KERNEL32.dll_GetProcAddress_1
mov dword [0x654c8c], eax
push 0x581128
mov eax, dword [0x654c88]
push eax
call sub.KERNEL32.dll_GetProcAddress_1
mov dword [0x654c90], eax
push 0x58113c
mov eax, dword [0x654c88]
push eax
call sub.KERNEL32.dll_GetProcAddress_1
mov dword [0x654c94], eax
push 0x581150
mov eax, dword [0x654c88]
push eax
call sub.KERNEL32.dll_GetProcAddress_1
mov dword [0x654c98], eax
push 0x581164
mov eax, dword [0x654c88]
push eax
call sub.KERNEL32.dll_GetProcAddress_1
mov dword [0x654c9c], eax
push 0x581178
mov eax, dword [0x654c88]
push eax
call sub.KERNEL32.dll_GetProcAddress_1
mov dword [0x654ca0], eax
push 0x581188
mov eax, dword [0x654c88]
push eax
call sub.KERNEL32.dll_GetProcAddress_1
mov dword [0x654ca4], eax
push 0x58119c
mov eax, dword [0x654c88]
push eax
call sub.KERNEL32.dll_GetProcAddress_1
mov dword [0x654ca8], eax
mov eax, dword [esi]
cmp byte [eax + 0x38], 0
jne 0x580cc8
mov eax, dword [esi]
cmp byte [eax + 0x13c], 0
je 0x580cc8
mov eax, dword [esi]
call fcn.00574ed8
test al, al
jne 0x580cc8
mov eax, dword [esi]
mov eax, dword [eax + 0x120]
push eax
mov eax, dword [esi]
push eax
push fcn.00580b58
mov eax, dword [ebp - 0x14]
push eax
push 0
push 0
mov ecx, dword [esi]
mov dl, 1
mov eax, dword [0x5746cc]
call fcn.00580800
jmp 0x5810d2
mov eax, dword [esi]
mov byte [eax + 0x15c], 0
lea eax, [ebp - 0x88]
push eax
mov ecx, 7
mov edx, 1
mov eax, dword [ebp - 0x14]
call fcn.00404d6c
mov eax, dword [ebp - 0x88]
lea edx, [ebp - 0x84]
call fcn.004090f4
mov eax, dword [ebp - 0x84]
mov edx, 0x5811b8
call fcn.00404c58
je 0x580d19
push ebp
call fcn.00580b38
pop ecx
jmp 0x5810d2
lea eax, [ebp - 0x14]
mov ecx, 7
mov edx, 1
call fcn.00404dac
mov edx, dword [ebp - 0x14]
mov eax, 0x5811c8
call fcn.00404e50
mov ebx, eax
cmp ebx, 1
jge 0x580d4b
mov eax, dword [esi]
mov edx, dword [eax]
call dword [edx + 0x38]
jmp 0x5810d2
lea eax, [ebp - 0x18]
push eax
mov ecx, ebx
dec ecx
mov edx, 1
mov eax, dword [ebp - 0x14]
call fcn.00404d6c
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x14]
call fcn.00404b14
mov ecx, eax
mov edx, ebx
mov eax, dword [ebp - 0x14]
call fcn.00404d6c
mov edx, dword [ebp - 0x18]
mov eax, 0x5811d4
call fcn.00404e50
mov ebx, eax
test ebx, ebx
jle 0x580dce
lea eax, [ebp - 0x8c]
push eax
mov eax, dword [ebp - 0x18]
call fcn.00404b14
mov ecx, eax
lea edx, [ebx + 1]
mov eax, dword [ebp - 0x18]
call fcn.00404d6c
mov eax, dword [ebp - 0x8c]
mov edx, 0x50
call fcn.00409660
mov edi, eax
lea eax, [ebp - 0x18]
push eax
mov ecx, ebx
dec ecx
mov edx, 1
mov eax, dword [ebp - 0x18]
call fcn.00404d6c
jmp 0x580dd3
mov edi, 0x50
xor eax, eax
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 0xc], eax
mov eax, dword [esi]
cmp dword [eax + 0x144], 0
jne 0x580e26
push 0
push 0
push 0
push 1
push 0x5811d8
call dword [0x654c8c]
mov dword [ebp - 0xc], eax
push 0
push 0
push 3
push 0
push 0
push edi
mov eax, dword [ebp - 0x18]
call fcn.00404d0c
push eax
mov eax, dword [ebp - 0xc]
push eax
call dword [0x654c94]
mov dword [ebp - 8], eax
jmp 0x580e81
push 0
push 0
mov eax, dword [esi]
mov eax, dword [eax + 0x144]
call fcn.00404d0c
push eax
push 3
push 0x5811d8
call dword [0x654c8c]
mov dword [ebp - 0xc], eax
push 0
push 0
push 3
mov eax, dword [esi]
mov eax, dword [eax + 0x14c]
call fcn.00404d0c
push eax
mov eax, dword [esi]
mov eax, dword [eax + 0x148]
call fcn.00404d0c
push eax
push edi
mov eax, dword [ebp - 0x18]
call fcn.00404d0c
push eax
mov eax, dword [ebp - 0xc]
push eax
call dword [0x654c94]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x580e9a
push ebp
call fcn.00580af0
pop ecx
push ebp
call fcn.00580b38
pop ecx
jmp 0x5810d2
push 0
push 0x84400000
push 0
push 0
push 0x5811e4
mov eax, dword [ebp - 0x1c]
call fcn.00404d0c
push eax
push 0x5811f0
mov eax, dword [ebp - 8]
push eax
call dword [0x654c98]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x580ede
push ebp
call fcn.00580af0
pop ecx
push ebp
call fcn.00580b38
pop ecx
jmp 0x5810d2
mov eax, 0x10000
call fcn.004027ac
mov ebx, eax
mov dl, 1
mov eax, dword [0x419d1c]
call fcn.00403a3c
mov dword [ebp - 0x20], eax
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
push eax
call dword [0x654c9c]
mov dword [ebp - 0x24], 0x10000
push 0
lea eax, [ebp - 0x24]
push eax
push ebx
push 5
mov eax, dword [ebp - 4]
push eax
call dword [0x654ca0]
test eax, eax
je 0x580f51
mov edi, ebx
mov eax, dword [ebp - 0x24]
mov byte [edi + eax], 0
lea edx, [ebp - 0x90]
mov eax, edi
call fcn.0040a024
mov eax, dword [ebp - 0x90]
xor edx, edx
call fcn.00409660
mov dword [ebp - 0x24], eax
jmp 0x580f56
xor eax, eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x581042
mov eax, dword [esi]
add eax, 0x15c
mov dword [ebp - 0x58], eax
mov eax, dword [esi]
mov edx, dword [eax + 0x160]
mov dword [ebp - 0x80], edx
mov edx, dword [eax + 0x164]
mov dword [ebp - 0x7c], edx
mov eax, dword [esi]
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x50]
xor ecx, ecx
mov edx, 0x28
call fcn.00403234
mov dword [ebp - 0x50], 0x28
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], 0x10000
push 0
push 8
lea eax, [ebp - 0x50]
push eax
mov eax, dword [ebp - 4]
push eax
call dword [0x654ca8]
test eax, eax
je 0x581074
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x581074
mov edx, dword [ebp - 0x3c]
mov ecx, eax
mov eax, dword [ebp - 0x20]
mov edi, dword [eax]
call dword [edi + 0xc]
cmp word [ebp - 0x7e], 0
je 0x581024
mov eax, dword [ebp - 0x20]
call fcn.0041e690
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], edx
fild qword [ebp - 0x98]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0xa0], eax
xor eax, eax
mov dword [ebp - 0x9c], eax
fild qword [ebp - 0xa0]
fdivr dword [0x5811f4]
fmulp st(1)
call fcn.00402ccc
mov ecx, eax
mov edx, dword [esi]
mov eax, dword [ebp - 0x7c]
call dword [ebp - 0x80]
mov eax, dword [ebp - 0x20]
call fcn.0041e690
cmp eax, dword [ebp - 0x24]
jae 0x581074
mov eax, dword [esi]
cmp byte [eax + 0x15c], 0
je 0x580f99
jmp 0x581074
lea eax, [ebp - 0x28]
push eax
push 0x400
push ebx
mov eax, dword [ebp - 4]
push eax
call dword [0x654ca4]
mov edx, ebx
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x20]
mov edi, dword [eax]
call dword [edi + 0xc]
cmp dword [ebp - 0x28], 0
je 0x581074
mov eax, dword [esi]
cmp byte [eax + 0x15c], 0
je 0x581042
mov eax, ebx
call fcn.004027cc
push ebp
call fcn.00580af0
pop ecx
push 0
push 0
mov eax, dword [ebp - 0x20]
call fcn.0041e67c
xor eax, eax
push ebp
push 0x5810cb
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [esi]
cmp byte [eax + 0x15c], 0
jne 0x5810b5
mov edx, dword [ebp - 0x20]
mov eax, dword [esi]
mov si, 0xffe4
call fcn.00403c68
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5810d2
mov eax, dword [ebp - 0x20]
call fcn.00403a6c
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x581104
lea eax, [ebp - 0x90]
mov edx, 4
call fcn.00404880
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00404880
ret