Function at 0x5151cc
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xc
push 0
push 0
dec ecx
jne 0x5151d4
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x51583a
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebx + 0x6c]
call fcn.00513fe0
cmp byte [ebx + 0x60], 0
jne 0x51521d
mov eax, dword [ebx + 0x6c]
call fcn.004202a8
test eax, eax
jne 0x515214
mov dl, 2
mov eax, ebx
call fcn.005163cc
jmp 0x51521d
mov dl, 1
mov eax, ebx
call fcn.005163cc
mov eax, dword [ebx + 0x6c]
call fcn.004202a8
mov esi, eax
sub esi, 1
jno 0x515231
call fcn.00403d94
test esi, esi
jl 0x515331
inc esi
xor edi, edi
mov edx, edi
mov eax, dword [ebx + 0x6c]
call fcn.005140f8
mov edx, dword [eax + 0x18]
lea eax, [ebp - 0xc]
call fcn.00404e00
cmp dword [ebp - 0xc], 0
je 0x515329
cmp byte [ebx + 0x60], 1
jne 0x5152f0
mov edx, 0x515850
mov eax, dword [ebp - 0xc]
call fcn.004ea500
test al, al
jne 0x515329
mov edx, 0x515860
mov eax, dword [ebp - 0xc]
call fcn.004ea500
test al, al
jne 0x515329
mov edx, 0x515870
mov eax, dword [ebp - 0xc]
call fcn.004ea500
test al, al
jne 0x515329
mov edx, 0x515880
mov eax, dword [ebp - 0xc]
call fcn.004ea500
test al, al
jne 0x515329
mov edx, 0x515890
mov eax, dword [ebp - 0xc]
call fcn.004ea500
test al, al
jne 0x515329
mov edx, 0x5158ac
mov eax, dword [ebp - 0xc]
call fcn.004ea500
test al, al
jne 0x515329
mov edx, edi
mov eax, dword [ebx + 0x6c]
call fcn.005140f8
add eax, 0x18
mov edx, 0x515880
call fcn.00404dbc
jmp 0x515329
mov edx, 0x5158c0
mov eax, dword [ebp - 0xc]
call fcn.004ea500
test al, al
jne 0x515329
mov edx, 0x5158cc
mov eax, dword [ebp - 0xc]
call fcn.004ea500
test al, al
jne 0x515329
mov edx, edi
mov eax, dword [ebx + 0x6c]
call fcn.005140f8
add eax, 0x18
mov edx, 0x5158c0
call fcn.00404dbc
inc edi
dec esi
jne 0x51523c
mov eax, dword [ebx + 0x6c]
call fcn.004202a8
test eax, eax
jle 0x51537e
cmp dword [ebx + 0x44], 0
je 0x51537e
mov edx, 0x515850
mov eax, dword [ebx + 0x44]
call fcn.004ea500
test al, al
jne 0x51537e
mov edx, 0x515870
mov eax, dword [ebx + 0x44]
call fcn.004ea500
test al, al
jne 0x51537e
mov edx, 0x515860
mov eax, dword [ebx + 0x44]
call fcn.004ea500
test al, al
jne 0x51537e
lea eax, [ebx + 0x44]
call fcn.00404d68
cmp byte [ebx + 0x60], 1
jne 0x5153fb
lea edx, [ebp - 0x10]
mov eax, dword [0x5dc664]
mov eax, dword [eax]
call fcn.0050bf4c
mov eax, dword [ebx + 0x40]
call fcn.00405028
test eax, eax
jne 0x5153ee
mov eax, dword [ebx + 0x6c]
cmp dword [eax + 0x2c], 1
jle 0x5153cc
cmp dword [eax + 0x20], 0
jle 0x5153bd
lea eax, [ebx + 0x40]
mov edx, 0x5158d8
call fcn.00404dbc
jmp 0x5153ee
lea eax, [ebx + 0x40]
mov edx, 0x5158f0
call fcn.00404dbc
jmp 0x5153ee
cmp dword [eax + 0x20], 0
jle 0x5153e1
lea eax, [ebx + 0x40]
mov edx, 0x5158d8
call fcn.00404dbc
jmp 0x5153ee
lea eax, [ebx + 0x40]
mov edx, 0x515910
call fcn.00404dbc
mov eax, dword [ebx + 0x6c]
mov eax, dword [eax + 0x24]
mov edx, ebx
mov ecx, dword [eax]
call dword [ecx + 4]
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 5]
lea edx, [ebp - 6]
mov eax, ebx
call fcn.005166e0
mov eax, dword [ebx + 0xc0]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [ebx + 0x68]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x515431
mov edx, dword [ebx + 0x68]
mov eax, dword [ebx + 0xc0]
mov ecx, dword [eax]
call dword [ecx + 8]
mov esi, dword [ebx + 0xc0]
mov eax, dword [ebp - 4]
push eax
push 1
lea eax, [ebp - 0x14]
push eax
mov cl, byte [ebp - 6]
mov dl, byte [ebp - 5]
mov eax, dword [ebx + 0x64]
call fcn.004facc4
mov ecx, dword [ebp - 0x14]
mov edx, 0x515924
mov eax, esi
call fcn.004f9cd0
mov al, byte [ebp - 6]
push eax
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x18]
push eax
mov cl, byte [ebp - 5]
mov edx, 0x51592c
mov eax, dword [ebx + 0x90]
call fcn.004fb6b4
mov ecx, dword [ebp - 0x18]
mov edx, 0x515954
mov eax, esi
call fcn.004f9cd0
mov eax, dword [ebp - 4]
push eax
push 0
lea eax, [ebp - 0x1c]
push eax
mov cl, byte [ebp - 6]
mov dl, byte [ebp - 5]
mov eax, dword [ebx + 0x98]
call fcn.004facc4
mov ecx, dword [ebp - 0x1c]
mov edx, 0x515964
mov eax, esi
call fcn.004f9cd0
mov eax, dword [ebp - 4]
push eax
push 0
lea eax, [ebp - 0x20]
push eax
mov cl, byte [ebp - 6]
mov dl, byte [ebp - 5]
mov eax, dword [ebx + 0x3c]
call fcn.004facc4
mov ecx, dword [ebp - 0x20]
mov edx, 0x515970
mov eax, esi
call fcn.004f9cd0
cmp byte [ebx + 0xc5], 0
jne 0x5154f6
xor ecx, ecx
mov edx, 0x51597c
mov eax, esi
call fcn.004f9cd0
jmp 0x51551d
mov eax, dword [ebp - 4]
push eax
push 0
lea eax, [ebp - 0x24]
push eax
mov cl, byte [ebp - 6]
mov dl, byte [ebp - 5]
mov eax, dword [ebx + 0x30]
call fcn.004facc4
mov ecx, dword [ebp - 0x24]
mov edx, 0x51597c
mov eax, esi
call fcn.004f9cd0
lea edx, [ebp - 0x28]
mov eax, dword [ebx + 0x78]
call fcn.00420b80
mov ecx, dword [ebp - 0x28]
mov edx, 0x515988
mov eax, esi
call fcn.004f9cd0
cmp byte [ebx + 0x60], 1
jne 0x51562a
mov eax, ebx
call fcn.00515190
cmp al, 1
jne 0x515562
mov ecx, 0x51599c
mov edx, 0x5159a8
mov eax, esi
call fcn.004f9cd0
jmp 0x515648
mov ecx, dword [ebx + 0x40]
mov edx, 0x5159c0
mov eax, esi
call fcn.004f9cd0
cmp dword [ebx + 0x38], 0
jbe 0x5155c1
lea ecx, [ebp - 0x30]
mov edx, 0x5159c0
mov eax, esi
call fcn.004f9ab8
push dword [ebp - 0x30]
push 0x5159d8
push 0x5159e4
push 0x5159f0
push 0x5159fc
push dword [ebx + 0x38]
push 0x515a10
lea eax, [ebp - 0x2c]
mov edx, 7
call fcn.004050e8
mov ecx, dword [ebp - 0x2c]
mov edx, 0x5159c0
mov eax, esi
call fcn.004f9cd0
mov eax, dword [ebx + 0x6c]
call fcn.004202a8
test eax, eax
jle 0x515608
lea ecx, [ebp - 0x38]
mov edx, 0x5159c0
mov eax, esi
call fcn.004f9ab8
push dword [ebp - 0x38]
push 0x515a1c
push dword [ebp - 0x10]
push 0x515a10
lea eax, [ebp - 0x34]
mov edx, 4
call fcn.004050e8
mov ecx, dword [ebp - 0x34]
mov edx, 0x5159c0
mov eax, esi
call fcn.004f9cd0
mov ecx, 0x51599c
mov edx, 0x5159a8
mov eax, esi
call fcn.004f9cd0
mov ecx, dword [ebx + 0x44]
mov edx, 0x515a34
mov eax, esi
call fcn.004f9cd0
jmp 0x515648
mov ecx, dword [ebx + 0x44]
mov edx, 0x515a34
mov eax, esi
call fcn.004f9cd0
mov ecx, dword [ebx + 0x40]
mov edx, 0x5159c0
mov eax, esi
call fcn.004f9cd0
lea edx, [ebp - 0x3c]
mov eax, dword [ebx + 0xa8]
call fcn.004f8160
mov ecx, dword [ebp - 0x3c]
mov edx, 0x515a58
mov eax, esi
call fcn.004f9cd0
mov eax, dword [ebp - 4]
push eax
push 0
lea eax, [ebp - 0x40]
push eax
mov cl, byte [ebp - 6]
mov dl, byte [ebp - 5]
mov eax, dword [ebx + 0xa4]
call fcn.004facc4
mov ecx, dword [ebp - 0x40]
mov edx, 0x515a68
mov eax, esi
call fcn.004f9cd0
mov al, byte [ebp - 6]
push eax
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x44]
push eax
mov cl, byte [ebp - 5]
mov edx, 0x51592c
mov eax, dword [ebx + 0x88]
call fcn.004fb6b4
mov ecx, dword [ebp - 0x44]
mov edx, 0x515a7c
mov eax, esi
call fcn.004f9cd0
mov eax, dword [ebp - 4]
push eax
push 0
lea eax, [ebp - 0x48]
push eax
mov cl, byte [ebp - 6]
mov dl, byte [ebp - 5]
mov eax, dword [ebx + 0x94]
call fcn.004f9e24
mov ecx, dword [ebp - 0x48]
mov edx, 0x515a94
mov eax, esi
call fcn.004f9cd0
mov ecx, dword [ebx + 0x9c]
mov edx, 0x515ab8
mov eax, esi
call fcn.004f9cd0
mov eax, ebx
call fcn.00516364
test al, al
je 0x51572b
call fcn.0040c488
add esp, 0xfffffff8
fstp qword [esp]
wait
lea edx, [ebp - 0x4c]
xor eax, eax
call fcn.004f61a8
mov ecx, dword [ebp - 0x4c]
mov edx, 0x515acc
mov eax, esi
call fcn.004f9cd0
jmp 0x51574a
push dword [ebx + 0x54]
push dword [ebx + 0x50]
lea edx, [ebp - 0x50]
xor eax, eax
call fcn.004f61a8
mov ecx, dword [ebp - 0x50]
mov edx, 0x515acc
mov eax, esi
call fcn.004f9cd0
cmp byte [ebx + 0x8c], 2
je 0x51577e
lea edx, [ebp - 0x54]
xor eax, eax
mov al, byte [ebx + 0x8c]
add eax, 1
jno 0x515768
call fcn.00403d94
call fcn.0040a100
mov ecx, dword [ebp - 0x54]
mov edx, 0x515adc
mov eax, esi
call fcn.004f9cd0
jmp 0x5157a3
mov edx, 0x515adc
mov eax, esi
call fcn.004f9c40
test eax, eax
jl 0x5157a3
mov edx, 0x515adc
mov eax, esi
call fcn.004f9c40
mov edx, eax
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov eax, dword [ebx + 0x5c]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x5157b9
mov edx, dword [ebx + 0x5c]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x40]
lea edx, [ebp - 0x58]
mov eax, ebx
call fcn.0051679c
cmp dword [ebp - 0x58], 0
jne 0x5157fe
lea ecx, [ebp - 0x5c]
mov edx, 0x515af0
mov eax, esi
call fcn.004f9ab8
cmp dword [ebp - 0x5c], 0
je 0x515817
lea ecx, [ebp - 0x60]
mov edx, 0x515af0
mov eax, esi
call fcn.004f9ab8
mov ecx, dword [ebp - 0x60]
mov edx, 0x515b04
mov eax, esi
call fcn.004f9cd0
jmp 0x515817
lea edx, [ebp - 0x64]
mov eax, ebx
call fcn.0051679c
mov ecx, dword [ebp - 0x64]
mov edx, 0x515b04
mov eax, esi
call fcn.004f9cd0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x515841
lea eax, [ebp - 0x64]
mov edx, 0x17
call fcn.00404d8c
lea eax, [ebp - 4]
call fcn.00404d68
ret