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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, 0x1068
call fcn.00513740
mov eax, dword [0x61308c]
xor eax, esp
mov dword [esp + 0x1064], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [edx]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x5c], edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x60], eax
push edi
test esi, esi
je 0x502380
lea eax, [esi*8]
sub eax, esi
lea ecx, [eax*4 - 0x1c]
mov eax, dword [edx + 0xc]
mov eax, dword [eax + esi*4 - 4]
test eax, eax
je 0x50232c
inc ecx
shr eax, 1
jne 0x502327
cmp ecx, 7
jle 0x502380
cmp ecx, 0x24
jg 0x50233d
mov esi, 3
jmp 0x502385
cmp ecx, 0x8c
jg 0x50234c
mov esi, 4
jmp 0x502385
cmp ecx, 0x1c2
jg 0x50235b
mov esi, 5
jmp 0x502385
cmp ecx, 0x517
jg 0x50236a
mov esi, 6
jmp 0x502385
xor eax, eax
cmp ecx, 0xdc9
setg al
add eax, 7
mov dword [esp + 0x28], eax
mov esi, eax
jmp 0x502389
mov esi, 2
mov dword [esp + 0x28], esi
lea ecx, [esp + 0x78]
call fcn.004ff970
test eax, eax
jne 0x502b77
lea ecx, [esi - 1]
mov edx, 1
shl edx, cl
mov eax, 1
mov ecx, esi
mov dword [esp + 0x5c], edx
shl eax, cl
mov edi, edx
mov dword [esp + 0x38], eax
cmp edi, eax
jge 0x5023df
mov eax, edi
lea esi, [esp + 0x68]
shl eax, 4
add esi, eax
mov ecx, esi
call fcn.004ff970
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x502449
inc edi
add esi, 0x10
cmp edi, dword [esp + 0x38]
jl 0x5023c6
lea ecx, [esp + 0x44]
call fcn.004ff970
mov esi, eax
test esi, esi
jne 0x502aab
mov edi, dword [esp + 0x30]
cmp dword [ebp + 0x10], eax
jne 0x5024f6
mov eax, dword [edi]
lea ecx, [esp + 0x44]
lea edx, [eax*8]
sub edx, eax
shl edx, 3
call fcn.00504790
mov esi, eax
test esi, esi
jne 0x502a5b
push eax
lea eax, [esp + 0x48]
mov edx, edi
push eax
mov ecx, eax
call fcn.00504360
mov esi, eax
add esp, 8
test esi, esi
jne 0x502a5b
mov dword [esp + 0x34], 0x504170
jmp 0x502513
mov ecx, dword [esp + 0x5c]
cmp ecx, edi
jge 0x5024ad
mov eax, ecx
lea esi, [esp + 0x68]
shl eax, 4
add esi, eax
sub edi, ecx
nop
cmp dword [esi + 0xc], 0
je 0x5024a5
xor ecx, ecx
cmp dword [esi], ecx
jle 0x50247f
nop dword [eax]
mov eax, dword [esi + 0xc]
mov dword [eax + ecx*4], 0
inc ecx
cmp ecx, dword [esi]
jl 0x502470
push dword [esi + 0xc]
call fcn.00536315
add esp, 4
mov dword [esi + 0xc], 0
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
add esi, 0x10
sub edi, 1
jne 0x502460
mov ecx, dword [esp + 0x84]
test ecx, ecx
je 0x5024de
xor eax, eax
cmp dword [esp + 0x78], eax
jle 0x5024d5
mov dword [ecx + eax*4], 0
inc eax
mov ecx, dword [esp + 0x84]
cmp eax, dword [esp + 0x78]
jl 0x5024c0
push ecx
call fcn.00536315
add esp, 4
mov eax, dword [esp + 0x2c]
pop edi
pop esi
mov ecx, dword [esp + 0x1064]
xor ecx, esp
call fcn.005120a1
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x44]
mov ecx, edi
call fcn.005042e0
mov esi, eax
test esi, esi
jne 0x502a5b
mov dword [esp + 0x34], 0x504090
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x78]
push eax
mov edx, edi
call fcn.005032a0
mov esi, eax
add esp, 4
test esi, esi
jne 0x502a5b
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x68]
mov eax, 0x10
lea ecx, [ecx - 1]
shl eax, cl
lea ecx, [esp + 0x78]
add edx, eax
call fcn.004ffdb0
mov esi, eax
test esi, esi
jne 0x502a5b
mov ecx, dword [esp + 0x28]
mov eax, 0x10
xor edi, edi
lea ecx, [ecx - 1]
shl eax, cl
lea eax, [esp + eax + 0x68]
mov dword [esp + 0x2c], eax
nop
mov edx, eax
mov ecx, eax
call fcn.00503a50
mov esi, eax
test esi, esi
jne 0x502a5b
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x34]
push dword [esp + 0x34]
call dword [esp + 0x40]
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x502a5b
mov eax, dword [esp + 0x28]
inc edi
dec eax
cmp edi, eax
mov eax, dword [esp + 0x2c]
jl 0x502570
mov eax, dword [esp + 0x5c]
inc eax
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x38]
jge 0x50260e
shl eax, 4
lea edi, [esp + 0x68]
add edi, eax
push edi
lea ecx, [edi - 0x10]
lea edx, [esp + 0x7c]
call fcn.004ffb20
mov esi, eax
add esp, 4
test esi, esi
jne 0x502a5b
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x34]
push edi
call dword [esp + 0x40]
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x502a5b
mov eax, dword [esp + 0x2c]
add edi, 0x10
inc eax
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x38]
jl 0x5025c7
lea ecx, [esp + 0x10]
call fcn.004ff970
mov esi, eax
test esi, esi
jne 0x502a5b
xor ecx, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x14], ecx
jle 0x502649
mov dword [eax], 0
lea eax, [eax + 4]
inc ecx
cmp ecx, dword [esp + 0x14]
jl 0x502635
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x60]
xor edx, edx
mov dword [eax], 1
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x2c], 1
mov ecx, dword [ecx]
cmp dword [eax], edx
setne dl
xor edi, edi
dec ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], ecx
xor esi, esi
xor eax, eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], esi
sub dword [esp + 0x2c], 1
jne 0x5026b0
cmp ecx, 0xffffffff
je 0x502904
mov eax, dword [esp + 0x60]
mov dword [esp + 0x2c], 0x1c
mov eax, dword [eax + 0xc]
mov eax, dword [eax + ecx*4]
dec ecx
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], ecx
jmp 0x5026b4
mov eax, dword [esp + 0x54]
shl dword [esp + 0x54], 1
shr eax, 0x1b
and eax, 1
test edi, edi
jne 0x50270c
test eax, eax
je 0x502683
mov ecx, dword [esp + 0x28]
inc esi
sub ecx, esi
mov dword [esp + 0x3c], esi
shl eax, cl
mov edi, 2
or dword [esp + 0x40], eax
mov ecx, dword [esp + 0x58]
cmp esi, dword [esp + 0x28]
jne 0x502683
xor edi, edi
nop dword [eax + eax]
cmp edx, 0x190
jl 0x5027a8
lea edx, [esp + 0x10]
mov ecx, edx
call fcn.00504810
jmp 0x5027e4
cmp edi, 1
jne 0x5026c6
test eax, eax
jne 0x5026c6
cmp edx, 0x190
jl 0x50272a
lea edx, [esp + 0x10]
mov ecx, edx
call fcn.00504810
jmp 0x502766
cmp edx, 0x78
jl 0x50273c
lea edx, [esp + 0x10]
mov ecx, edx
call fcn.00505140
jmp 0x502766
lea eax, [edx + edx]
cmp eax, 0x1ff
jge 0x50275b
cmp edx, 0x80
jge 0x50275b
lea edx, [esp + 0x10]
mov ecx, edx
call fcn.00504d40
jmp 0x502766
lea edx, [esp + 0x10]
mov ecx, edx
call fcn.00504fb0
mov esi, eax
mov dword [esp + 0x18], 0
test esi, esi
jne 0x502a08
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x34]
lea eax, [esp + 0x18]
push eax
call dword [esp + 0x40]
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x502a08
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x58]
jmp 0x502683
cmp edx, 0x78
jl 0x5027ba
lea edx, [esp + 0x10]
mov ecx, edx
call fcn.00505140
jmp 0x5027e4
lea eax, [edx + edx]
cmp eax, 0x1ff
jge 0x5027d9
cmp edx, 0x80
jge 0x5027d9
lea edx, [esp + 0x10]
mov ecx, edx
call fcn.00504d40
jmp 0x5027e4
lea edx, [esp + 0x10]
mov ecx, edx
call fcn.00504fb0
mov esi, eax
mov dword [esp + 0x18], 0
test esi, esi
jne 0x502a08
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x34]
lea eax, [esp + 0x18]
push eax
call dword [esp + 0x40]
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x502a08
inc edi
cmp edi, dword [esp + 0x28]
jge 0x502825
mov edx, dword [esp + 0x10]
jmp 0x5026f0
mov eax, dword [esp + 0x40]
lea edx, [esp + 0x68]
mov esi, dword [esp + 0x10]
xor ecx, ecx
shl eax, 4
add edx, eax
mov eax, dword [esp + 0x18]
cmp eax, dword [edx + 8]
setne cl
mov dword [esp + 0x3c], ecx
mov ecx, dword [edx]
cmp esi, ecx
mov eax, ecx
cmovl eax, esi
cmp eax, 0x15e
jl 0x502867
lea eax, [esp + 0x10]
push eax
mov ecx, eax
call fcn.00500bc0
add esp, 4
jmp 0x5028bc
cmp esi, ecx
mov eax, ecx
cmovl eax, esi
cmp eax, 0x50
jl 0x502884
lea eax, [esp + 0x10]
push eax
mov ecx, eax
call fcn.005012f0
add esp, 4
jmp 0x5028bc
lea eax, [esi + 1]
add eax, ecx
cmp eax, 0x200
jge 0x5028ac
cmp esi, ecx
cmovl ecx, esi
cmp ecx, 0x100
jg 0x5028ac
push eax
lea eax, [esp + 0x14]
push eax
mov ecx, eax
call fcn.005016b0
jmp 0x5028b9
push eax
lea eax, [esp + 0x14]
push eax
mov ecx, eax
call fcn.00500a60
add esp, 8
mov esi, eax
xor eax, eax
cmp dword [esp + 0x10], eax
cmovg eax, dword [esp + 0x3c]
mov dword [esp + 0x18], eax
test esi, esi
jne 0x502a08
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x34]
lea eax, [esp + 0x18]
push eax
call dword [esp + 0x40]
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x502a08
mov edx, dword [esp + 0x10]
lea edi, [eax + 1]
mov ecx, dword [esp + 0x58]
jmp 0x502677
cmp edi, 2
jne 0x5029f2
test esi, esi
jle 0x5029f2
xor edi, edi
test esi, esi
jle 0x5029f2
nop
cmp edx, 0x190
jl 0x502935
lea edx, [esp + 0x10]
mov ecx, edx
call fcn.00504810
jmp 0x502971
cmp edx, 0x78
jl 0x502947
lea edx, [esp + 0x10]
mov ecx, edx
call fcn.00505140
jmp 0x502971
lea eax, [edx + edx]
cmp eax, 0x1ff
jge 0x502966
cmp edx, 0x80
jge 0x502966
lea edx, [esp + 0x10]
mov ecx, edx
call fcn.00504d40
jmp 0x502971
lea edx, [esp + 0x10]
mov ecx, edx
call fcn.00504fb0
mov esi, eax
mov dword [esp + 0x18], 0
test esi, esi
jne 0x502a08
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x34]
lea eax, [esp + 0x18]
push eax
call dword [esp + 0x40]
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x502a08
mov ecx, dword [esp + 0x40]
add ecx, ecx
mov dword [esp + 0x40], ecx
test dword [esp + 0x38], ecx
je 0x5029e2
lea eax, [esp + 0x10]
push eax
lea edx, [esp + 0x7c]
mov ecx, eax
call fcn.004ffb20
mov esi, eax
add esp, 4
test esi, esi
jne 0x502a08
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x34]
lea eax, [esp + 0x18]
push eax
call dword [esp + 0x40]
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x502a08
inc edi
cmp edi, dword [esp + 0x3c]
jge 0x5029f2
mov edx, dword [esp + 0x10]
jmp 0x502920
mov eax, dword [esp + 0x64]
xor esi, esi
movaps xmm1, xmmword [esp + 0x10]
movups xmm0, xmmword [eax]
movups xmmword [eax], xmm1
movups xmmword [esp + 0x10], xmm0
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x502a5b
xor eax, eax
cmp dword [esp + 0x10], eax
jle 0x502a32
nop dword [eax + eax]
mov dword [ecx + eax*4], 0
inc eax
mov ecx, dword [esp + 0x1c]
cmp eax, dword [esp + 0x10]
jl 0x502a20
push ecx
call fcn.00536315
add esp, 4
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov ecx, dword [esp + 0x50]
test ecx, ecx
je 0x502aab
xor eax, eax
cmp dword [esp + 0x44], eax
jle 0x502a82
nop dword [eax + eax]
mov dword [ecx + eax*4], 0
inc eax
mov ecx, dword [esp + 0x50]
cmp eax, dword [esp + 0x44]
jl 0x502a70
push ecx
call fcn.00536315
add esp, 4
mov dword [esp + 0x50], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov ecx, dword [esp + 0x84]
test ecx, ecx
je 0x502b04
xor eax, eax
cmp dword [esp + 0x78], eax
jle 0x502ad5
nop
mov dword [ecx + eax*4], 0
inc eax
mov ecx, dword [esp + 0x84]
cmp eax, dword [esp + 0x78]
jl 0x502ac0
push ecx
call fcn.00536315
add esp, 4
mov dword [esp + 0x84], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x5c]
cmp edx, ecx
jge 0x502b75
mov eax, edx
lea edi, [esp + 0x68]
shl eax, 4
add edi, eax
sub ecx, edx
mov dword [esp + 0x38], ecx
cmp dword [edi + 0xc], 0
je 0x502b69
xor ecx, ecx
cmp dword [edi], ecx
jle 0x502b3f
nop dword [eax]
mov eax, dword [edi + 0xc]
mov dword [eax + ecx*4], 0
inc ecx
cmp ecx, dword [edi]
jl 0x502b30
push dword [edi + 0xc]
call fcn.00536315
mov ecx, dword [esp + 0x3c]
add esp, 4
mov dword [edi + 0xc], 0
mov dword [edi], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
add edi, 0x10
sub ecx, 1
mov dword [esp + 0x38], ecx
jne 0x502b21
mov eax, esi
mov ecx, dword [esp + 0x106c]
pop edi
pop esi
xor ecx, esp
call fcn.005120a1
mov esp, ebp
pop ebp
ret