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

Disassembly:
push 0xffffffffffffffff
push 0x56d564
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x660038]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov dword [esp + 0x14], 0
mov ebp, dword [esp + 0x90]
mov ebx, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
test ebp, ebp
je 0x50845b
mov edi, dword [esp + 0x88]
cmp ebp, edi
je 0x50846b
call ebx
mov ebp, dword [esp + 0x90]
mov edi, dword [esp + 0x88]
mov esi, dword [esp + 0x94]
mov ecx, esi
sub ecx, dword [esp + 0x8c]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 1
jne 0x508524
test edi, edi
jne 0x5084a6
call ebx
mov edi, dword [esp + 0x88]
test edi, edi
je 0x5084aa
mov eax, dword [edi]
jmp 0x5084ac
xor eax, eax
mov ecx, dword [esp + 0x8c]
cmp ecx, dword [eax + 0x10]
jb 0x5084c1
call ebx
mov edi, dword [esp + 0x88]
mov esi, dword [esp + 0x8c]
test edi, edi
jne 0x5084d9
call ebx
mov edi, dword [esp + 0x88]
test edi, edi
je 0x5084dd
mov edi, dword [edi]
jmp 0x5084df
xor edi, edi
mov edx, dword [esp + 0x8c]
cmp edx, dword [edi + 0x10]
jb 0x5084ed
call ebx
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x8c]
mov eax, dword [ecx]
mov eax, dword [eax + 0x28]
add esi, 0x1c
push esi
mov esi, dword [esp + 0x84]
push edx
push esi
call eax
mov dword [esp + 0x78], 0
mov dword [esp + 0x14], 1
jmp 0x5087c3
test ebp, ebp
je 0x50852c
cmp ebp, edi
je 0x508535
call ebx
mov esi, dword [esp + 0x94]
sub esi, dword [esp + 0x8c]
mov eax, 0x2aaaaaab
imul esi
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 2
jne 0x50865d
push 1
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x90]
call fcn.00508150
mov esi, eax
mov eax, dword [esi]
test eax, eax
jne 0x508579
call ebx
mov eax, dword [esi]
test eax, eax
je 0x50857d
mov eax, dword [eax]
jmp 0x50857f
xor eax, eax
mov ecx, dword [esi + 4]
cmp ecx, dword [eax + 0x10]
jb 0x508589
call ebx
mov ebp, dword [esi + 4]
push 1
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x90]
call fcn.00508150
mov esi, eax
mov eax, dword [esi]
test eax, eax
jne 0x5085af
call ebx
mov eax, dword [esi]
test eax, eax
je 0x5085b3
mov eax, dword [eax]
jmp 0x5085b5
xor eax, eax
mov ecx, dword [esi + 4]
cmp ecx, dword [eax + 0x10]
jb 0x5085bf
call ebx
mov eax, dword [esp + 0x88]
mov esi, dword [esi + 4]
test eax, eax
jne 0x5085da
call ebx
mov eax, dword [esp + 0x88]
test eax, eax
je 0x5085de
mov ecx, dword [eax]
jmp 0x5085e0
xor ecx, ecx
mov edx, dword [esp + 0x8c]
cmp edx, dword [ecx + 0x10]
jb 0x5085f5
call ebx
mov eax, dword [esp + 0x88]
mov edi, dword [esp + 0x8c]
test eax, eax
jne 0x50860d
call ebx
mov eax, dword [esp + 0x88]
test eax, eax
je 0x508611
mov eax, dword [eax]
jmp 0x508613
xor eax, eax
mov ecx, dword [esp + 0x8c]
cmp ecx, dword [eax + 0x10]
jb 0x508621
call ebx
mov ecx, dword [esp + 0x84]
mov eax, dword [esp + 0x8c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x2c]
add ebp, 0x1c
push ebp
push esi
mov esi, dword [esp + 0x88]
add edi, 0x1c
push edi
push eax
push esi
call edx
mov dword [esp + 0x78], 0
mov dword [esp + 0x14], 1
jmp 0x5087c3
lea ecx, [esp + 0x2c]
call fcn.004f01b0
mov edi, 1
lea ecx, [esp + 0x40]
mov dword [esp + 0x78], edi
call fcn.004f01b0
mov byte [esp + 0x78], 2
mov eax, dword [esp + 0x90]
mov ebp, dword [esp + 0x94]
mov esi, eax
mov dword [esp + 0x14], esi
test eax, eax
jne 0x508713
call ebx
mov eax, dword [esp + 0x90]
xor ecx, ecx
cmp ebp, dword [ecx + 0xc]
ja 0x5086ae
call ebx
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x8c]
push ecx
push eax
mov eax, dword [esp + 0x90]
push edx
push eax
sub ebp, 0x30
call fcn.005090f0
mov ecx, dword [esp + 0xa4]
mov edx, dword [esp + 0xa0]
mov eax, dword [esp + 0x9c]
push ecx
mov ecx, dword [esp + 0x9c]
push edx
push eax
push ecx
call fcn.00509140
mov eax, dword [esp + 0xa8]
add esp, 0x20
test eax, eax
jne 0x50870f
call ebx
mov eax, dword [esp + 0x88]
test eax, eax
je 0x508717
mov ecx, dword [eax]
jmp 0x508719
mov ecx, dword [eax]
jmp 0x5086a0
xor ecx, ecx
mov eax, dword [esp + 0x8c]
cmp eax, dword [ecx + 0x10]
jb 0x50872e
call ebx
mov eax, dword [esp + 0x8c]
cmp dword [eax + 0x2c], edi
je 0x5087dd
mov ecx, dword [eax + 0x28]
cmp dword [ecx], 0
jne 0x5087dd
mov eax, dword [eax + 0x24]
test eax, eax
je 0x508762
lea ecx, [ecx + eax*4 - 4]
mov edi, edi
cmp dword [ecx], 0
jne 0x5087d9
sub eax, edi
sub ecx, 4
test eax, eax
jne 0x508750
test esi, esi
jne 0x5089cf
call ebx
xor eax, eax
cmp ebp, dword [eax + 0x10]
jb 0x508775
call ebx
test esi, esi
jne 0x5089d6
call ebx
xor eax, eax
cmp ebp, dword [eax + 0x10]
jb 0x508788
call ebx
mov ecx, dword [esp + 0x84]
mov eax, dword [ecx]
mov esi, dword [esp + 0x80]
mov eax, dword [eax + 0x28]
lea edx, [ebp + 0x1c]
push edx
push ebp
push esi
call eax
lea ecx, [esp + 0x40]
mov dword [esp + 0x14], edi
mov byte [esp + 0x78], 1
call fcn.004d1a40
lea ecx, [esp + 0x2c]
mov byte [esp + 0x78], 0
call fcn.004d1a40
mov eax, esi
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret
test eax, eax
je 0x508762
test esi, esi
jne 0x508815
call ebx
xor eax, eax
cmp ebp, dword [eax + 0x10]
jb 0x5087ec
call ebx
lea edx, [esp + 0x40]
lea edi, [ebp + 0x1c]
push edx
call fcn.004f0670
mov eax, dword [esp + 0x88]
test eax, eax
jne 0x508811
call ebx
mov eax, dword [esp + 0x88]
test eax, eax
je 0x508819
mov eax, dword [eax]
jmp 0x50881b
mov eax, dword [esi]
jmp 0x5087e5
xor eax, eax
mov ecx, dword [esp + 0x8c]
cmp ecx, dword [eax + 0x10]
jb 0x508829
call ebx
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x8c]
test eax, eax
jne 0x508879
call ebx
xor eax, eax
cmp ebp, dword [eax + 0x10]
jb 0x508843
call ebx
add esi, 0x1c
push esi
push edi
lea ecx, [esp + 0x48]
lea esi, [esp + 0x34]
call fcn.004f2de0
add esp, 8
call fcn.004f4f40
cmp dword [esp + 0x3c], 1
mov edx, eax
je 0x50887d
cmp dword [edx + 0x10], 1
je 0x5088f1
mov eax, esi
call fcn.004f3290
jmp 0x50888e
mov eax, dword [eax]
jmp 0x50883c
cmp dword [edx + 0x10], 1
jne 0x5088f1
lea eax, [esp + 0x2c]
call fcn.004f3290
neg eax
test eax, eax
jne 0x5088f1
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x5088c1
call ebx
xor eax, eax
cmp ebp, dword [eax + 0x10]
jb 0x5088a5
call ebx
mov eax, dword [esp + 0x88]
test eax, eax
jne 0x5088bd
call ebx
mov eax, dword [esp + 0x88]
test eax, eax
je 0x5088c5
mov eax, dword [eax]
jmp 0x5088c7
mov eax, dword [eax]
jmp 0x50889e
xor eax, eax
mov edx, dword [esp + 0x8c]
cmp edx, dword [eax + 0x10]
jb 0x5088d5
call ebx
mov ecx, dword [esp + 0x84]
mov eax, dword [ecx]
mov edx, dword [esp + 0x8c]
mov eax, dword [eax + 0x20]
push ebp
push edx
call eax
jmp 0x508977
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x508942
call ebx
xor eax, eax
cmp ebp, dword [eax + 0x10]
jb 0x508904
call ebx
mov edi, dword [esp + 0x84]
mov edx, dword [edi]
mov edx, dword [edx + 0x28]
lea eax, [esp + 0x2c]
push eax
push ebp
lea ecx, [esp + 0x5c]
push ecx
mov ecx, edi
call edx
mov esi, eax
mov byte [esp + 0x78], 3
mov eax, dword [esp + 0x88]
test eax, eax
jne 0x50893e
call ebx
mov eax, dword [esp + 0x88]
test eax, eax
je 0x508946
mov eax, dword [eax]
jmp 0x508948
mov eax, dword [eax]
jmp 0x5088fd
xor eax, eax
mov ecx, dword [esp + 0x8c]
cmp ecx, dword [eax + 0x10]
jb 0x508956
call ebx
mov edx, dword [edi]
mov eax, dword [esp + 0x8c]
mov edx, dword [edx + 0x20]
push esi
push eax
mov ecx, edi
call edx
lea eax, [esp + 0x54]
push eax
mov byte [esp + 0x7c], 2
call fcn.004d2570
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x90]
mov eax, dword [esp + 0x8c]
push ecx
mov ecx, dword [esp + 0x8c]
push edx
push eax
push ecx
call fcn.005091e0
mov edx, dword [esp + 0xa4]
mov eax, dword [esp + 0xa0]
mov ecx, dword [esp + 0x9c]
push edx
mov edx, dword [esp + 0x9c]
push eax
push ecx
push edx
call fcn.00509140
mov esi, dword [esp + 0x34]
mov edi, 1
jmp 0x5086f4
mov eax, dword [esi]
jmp 0x50876e
mov eax, dword [esi]
jmp 0x508781