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

Disassembly:
sub esp, 0x78
push ebx
mov ebx, dword [esp + 0x80]
xor eax, eax
push ebp
push esi
push edi
mov edi, dword [ebx]
mov dword [esp + 0x14], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x2c], 0x86
mov dword [esp + 0x30], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x4c], eax
cmp dword [edi], eax
je 0x501329
xor edx, edx
mov dword [esp + 0x18], edx
jmp 0x50133a
push 0x28
push edi
call fcn.00511ae0
add esp, 8
mov dword [esp + 0x18], eax
mov edx, eax
cmp dword [edi], 0
jne 0x50266d
mov ebp, dword [esp + 0x94]
xorps xmm0, xmm0
mov ecx, dword [esp + 0x90]
movups xmmword [edx], xmm0
movups xmmword [edx + 0x10], xmm0
movq qword [edx + 0x20], xmm0
mov eax, dword [ebp + 8]
mov dword [edx], eax
mov dword [edx + 0x10], ecx
mov dword [ebp + 8], edx
mov ebp, 0x96
movzx eax, word [ecx]
mov dword [esp + 0x84], ebp
cmp ax, bp
je 0x50138b
mov ebp, 0x97
mov esi, eax
cmp ax, bp
jne 0x50139d
movzx esi, word [ecx + 2]
add ecx, 2
mov dword [esp + 0x2c], eax
mov dword [esp + 0x90], ecx
movzx eax, si
mov dword [esp + 0x24], eax
movzx eax, word [ecx + 2]
lea ecx, [ecx + eax*2]
movzx eax, word [ecx]
cmp eax, 0x78
je 0x5013a4
mov ebp, eax
mov dword [esp + 0x10], ebp
cmp ebp, 0x79
jne 0x501426
sub ecx, dword [ebx + 8]
mov edx, dword [ebx + 0xc]
mov eax, ecx
sar eax, 1
mov eax, dword [edx + eax*4]
test eax, eax
je 0x501422
mov dword [esp + 0x40], eax
lea eax, [ecx + 2]
sar eax, 1
mov eax, dword [edx + eax*4]
mov dword [esp + 0x80], eax
lea eax, [ecx + 4]
sar eax, 1
mov eax, dword [edx + eax*4]
mov dword [esp + 0x38], eax
lea eax, [ecx + 6]
sar eax, 1
mov eax, dword [edx + eax*4]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x38]
cmp eax, 0x27
jne 0x501411
mov dword [esp + 0x10], 0x7a
jmp 0x501426
cmp eax, 0x28
mov ecx, 0x7b
cmove ebp, ecx
mov dword [esp + 0x10], ebp
jmp 0x501426
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x90]
mov dword [esp + 0x54], 0x8a
mov dword [esp + 0x78], 0x88
mov dword [esp + 0x7c], 0x8d
movzx eax, word [ecx + 2]
lea ebp, [ecx + 4]
mov dword [esp + 0x20], ebp
mov dword [esp + 0x64], 0x82
mov dword [esp + 0x68], 0x83
lea eax, [ecx + eax*2]
mov dword [esp + 0x34], 0x84
movzx ecx, word [eax]
mov dword [esp + 0x44], eax
xor eax, eax
cmp ecx, 0x78
mov dword [esp + 0x6c], 0x85
mov dword [esp + 0x50], 0x8b
sete al
mov dword [esp + 0x60], 0x92
mov dword [esp + 0x58], 0x95
mov dword [esp + 0x5c], 0xa2
mov dword [esp + 0x3c], 0x8f
cmp si, word [esp + 0x54]
je 0x5014b8
cmp si, word [esp + 0x3c]
jne 0x5014fd
movzx eax, word [ebp]
cmp ax, word [esp + 0x60]
jb 0x5014ca
cmp ax, word [esp + 0x58]
jbe 0x5014d8
cmp ax, word [esp + 0x5c]
je 0x5014d8
mov eax, 1
jmp 0x5014da
xor eax, eax
mov dword [esp + 0x1c], eax
cmp si, word [esp + 0x54]
jne 0x5014fd
cmp ecx, 0x7a
je 0x5014f3
cmp ecx, 0x7b
jne 0x5015d5
mov dword [esp + 0x24], 0x8f
jmp 0x501557
mov dword [esp + 0x1c], eax
cmp si, word [esp + 0x78]
je 0x5015a1
cmp si, word [esp + 0x7c]
je 0x5015a1
cmp si, word [esp + 0x64]
je 0x501557
mov ecx, eax
mov dword [esp + 0x1c], ecx
cmp si, word [esp + 0x68]
je 0x501557
mov dword [esp + 0x1c], eax
cmp si, word [esp + 0x34]
je 0x501557
mov dword [esp + 0x1c], eax
cmp si, word [esp + 0x6c]
je 0x501557
mov dword [esp + 0x1c], eax
cmp si, word [esp + 0x50]
je 0x501557
mov dword [esp + 0x1c], eax
cmp si, word [esp + 0x3c]
jne 0x5015d5
mov esi, dword [esp + 0x90]
mov ecx, esi
sub ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
sar ecx, 1
mov eax, dword [eax + ecx*4]
mov dword [esp + 0x14], eax
mov dword [edx + 0x24], eax
mov eax, dword [esp + 0x34]
cmp word [esp + 0x24], ax
jne 0x5015d5
lea eax, [esp + 0x70]
push eax
push 0
push 0
push esi
push ebx
call fcn.00514b70
mov ecx, dword [esp + 0x2c]
add esp, 0x14
mov dword [ecx + 0x20], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x30], eax
jmp 0x5015d5
movzx ecx, word [ebp]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x14]
lea esi, [ecx + ecx]
mov dword [esp + 0x48], esi
cmp byte [ecx + eax], 0
jne 0x5015c1
mov eax, dword [ebx + 0x20]
lea eax, [eax + ecx*4]
jmp 0x5015c7
mov eax, dword [ebx + 0x24]
lea eax, [eax + esi*4]
add ebp, 2
mov dword [esp + 0x14], eax
mov dword [edx + 0x24], eax
mov dword [esp + 0x20], ebp
mov esi, dword [esp + 0x10]
xor ecx, ecx
cmp si, 0x7a
je 0x5015f3
cmp si, 0x7b
jne 0x5015f8
mov eax, 0x97
cmp word [esp + 0x2c], ax
je 0x5015f8
mov ecx, 1
mov edx, dword [esp + 0x2c]
lea eax, [ecx + 1]
cmp dx, word [esp + 0x84]
cmovne eax, ecx
test eax, eax
je 0x50161c
push eax
push ebx
call fcn.004fc250
mov edx, dword [esp + 0x34]
add esp, 8
xor eax, eax
cmp si, 0x7a
je 0x501634
cmp si, 0x7b
jne 0x50164f
mov eax, 0x97
cmp dx, ax
je 0x501688
push 0
push 0x40
push 0
push 0x8b
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
mov eax, 1
mov ecx, dword [esp + 0x2c]
mov edx, 0x96
cmp cx, dx
jne 0x50167a
push 0
push 2
shl eax, 2
push eax
push 0x8b
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
jmp 0x50181a
mov eax, 0x97
cmp cx, ax
jne 0x50181a
push 0
push 0x8b
push 0
push 2
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
cmp si, 0x7b
je 0x5016d5
push 4
push 0x40
push 0
push 0xb
push 0
push 0xb
push 0x60
push dword [ebx]
call fcn.0051c880
push 0
push 0x40
push 0
push 2
push 0
push edi
call fcn.0051ae50
add esp, 0x38
mov dword [esp + 0x4c], eax
jmp 0x50181a
mov eax, dword [esp + 0x24]
cmp ax, word [esp + 0x34]
je 0x50173b
cmp ax, word [esp + 0x50]
jae 0x50173b
push 0
push 0x40
push 0
push 2
push 1
push edi
call fcn.0051ae50
push 4
push 0x8b
push 0
push 2
push 0x20
push edi
mov esi, eax
call fcn.0051c640
push edi
call fcn.0051c410
add esp, 0x34
mov ecx, eax
test esi, esi
je 0x501816
test ecx, ecx
je 0x501816
mov eax, dword [esi + 8]
and eax, 0xfffffffd
mov dword [esi + 0xc], ecx
or eax, 1
mov dword [esi + 8], eax
jmp 0x501816
push 0
push 0x40
push 0
push 2
push 1
push edi
call fcn.0051ae50
push 4
push 0x8b
push 0
push 2
push 0x20
push edi
mov esi, eax
call fcn.0051c640
push 0x22
push edi
call fcn.0051c380
push edi
mov ebp, eax
call fcn.0051c410
add esp, 0x3c
mov ecx, eax
test esi, esi
je 0x50178c
test ecx, ecx
je 0x50178c
mov eax, dword [esi + 8]
and eax, 0xfffffffd
mov dword [esi + 0xc], ecx
or eax, 1
mov dword [esi + 8], eax
mov eax, dword [esp + 0x34]
cmp word [esp + 0x24], ax
jne 0x5017cb
mov esi, dword [esp + 0x18]
cmp dword [esi + 0x20], 0
jl 0x5017cb
push dword [esp + 0x14]
push 0x8d
push 0
push 1
push 0x20
push edi
call fcn.0051c640
mov eax, 0xfffffffe
add esp, 0x18
sub eax, dword [esi + 0x20]
mov ecx, 0x81
shl eax, 2
jmp 0x5017d4
mov eax, dword [esp + 0x14]
mov ecx, 0x8d
push eax
push ecx
push 0
push 2
push 0
push edi
call fcn.0051ae50
push edi
mov esi, eax
call fcn.0051c410
add esp, 0x1c
mov dword [esp + 0x4c], esi
mov ecx, eax
test ebp, ebp
je 0x501812
mov dword [esp + 0x4c], esi
test ecx, ecx
je 0x501812
mov eax, dword [ebp + 8]
and eax, 0xfffffffd
mov dword [ebp + 0xc], ecx
or eax, 1
mov dword [esp + 0x4c], esi
mov dword [ebp + 8], eax
mov ebp, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
cmp dword [esp + 0x38], 0
je 0x50184f
push dword [esp + 0x74]
push 0x40
push dword [esp + 0x48]
push 0x8d
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
cmp dword [esp + 0x38], 0x29
jne 0x50184f
push edi
call fcn.0051c410
add esp, 4
mov dword [esp + 0x28], eax
cmp si, 0x7b
jne 0x501867
push edi
call fcn.0051c410
mov esi, dword [esp + 0x1c]
add esp, 4
mov dword [esi + 0x18], eax
jmp 0x5018a7
cmp si, 0x7a
jne 0x5018a3
push edi
call fcn.0051c410
mov ecx, dword [esp + 0x20]
add esp, 4
mov esi, dword [esp + 0x18]
mov edx, eax
mov dword [esp + 0x28], edx
test ecx, ecx
je 0x5018ab
mov eax, dword [esp + 0x24]
add eax, 0xffffff7a
cmp ax, 4
ja 0x5018ab
cmp dword [esp + 0x38], 0
jne 0x5018ab
mov dword [esi + 0x14], edx
jmp 0x5018ab
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
cmp ax, word [esp + 0x34]
jne 0x501b27
mov edx, dword [esp + 0x30]
xor esi, esi
test edx, edx
je 0x5018e3
push dword [ebx + 0x44]
push 0x8d
push esi
push 3
push 0x20
push edi
call fcn.0051c640
mov edx, dword [esp + 0x48]
add esp, 0x18
mov esi, 1
mov ebp, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov eax, dword [ebp + 0x20]
test eax, eax
jns 0x501a2e
cmp cx, 0x7b
jne 0x50191c
add esi, 2
test edx, edx
jne 0x501949
push dword [esp + 0x14]
push 0x8d
push edx
push 3
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
jmp 0x501949
cmp eax, 0xffffffff
jne 0x501939
push 0
push 0xb
push dword [esp + 0x1c]
push 0x8d
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
cmp word [esp + 0x10], 0x7a
je 0x501948
cmp dword [esp + 0x1c], 0
je 0x501949
inc esi
test esi, esi
je 0x501957
push esi
push ebx
call fcn.004fc250
add esp, 8
mov ecx, dword [esp + 0x30]
xor esi, esi
test ecx, ecx
je 0x501980
push 0
push 3
push 0
push 0x8b
push 0x20
push edi
mov esi, 1
call fcn.0051c640
mov ecx, dword [esp + 0x48]
add esp, 0x18
mov eax, dword [esp + 0x10]
cmp ax, 0x7b
jne 0x501a10
test ecx, ecx
je 0x5019aa
push dword [esp + 0x14]
push 0x8d
push 0
push 3
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
push 0
push 2
shl esi, 2
push esi
push 0x8b
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
cmp dword [ebp + 0x20], 0xffffffff
jne 0x5019f3
xor eax, eax
cmp dword [esp + 0x30], eax
setne al
lea eax, [eax*4 + 4]
push eax
push 0x40
push 0
push 0xb
push dword [esp + 0x24]
push 0x8d
push 0x60
push edi
call fcn.0051c880
add esp, 0x20
push 0
push 3
lea eax, [esi + 4]
push eax
push 0x8b
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
jmp 0x501ce3
cmp ax, 0x7a
je 0x501a21
cmp dword [esp + 0x1c], 0
je 0x501ce3
push 0
push 2
lea eax, [esi*4]
jmp 0x5019fa
cmp cx, 0x79
jne 0x501a3b
cmp dword [esp + 0x1c], 0
je 0x501a3c
inc esi
inc eax
add esi, eax
push esi
push ebx
call fcn.004fc250
add esp, 8
cmp dword [esp + 0x30], 0
je 0x501a66
push 0
push 3
push 0
push 0x8b
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
push dword [esp + 0x14]
push 0x8d
push 0
push 1
push 0x20
push edi
call fcn.0051c640
lea eax, [esi*4]
push eax
push 0x40
push 0
push 0xb
push 0
push 3
push 0x60
push edi
call fcn.0051c880
xor eax, eax
add esp, 0x38
cmp dword [esp + 0x30], eax
setne al
cmp word [esp + 0x10], 0x79
mov dword [esp + 0x74], eax
jne 0x501ab8
cmp dword [esp + 0x1c], 0
jne 0x501ab8
mov esi, eax
jmp 0x501ad8
push 0
push 2
shl eax, 2
push eax
push 0x8b
push 0x20
push edi
call fcn.0051c640
mov esi, dword [esp + 0x8c]
add esp, 0x18
inc esi
push 0
push 3
push dword [esp + 0x1c]
push 0x8d
push 0x20
push edi
call fcn.0051c640
push 0
push 1
lea eax, [esi*4]
push eax
push 0x8b
push 0x20
push edi
call fcn.0051c640
lea eax, [esi + 1]
push eax
mov eax, dword [ebp + 0x20]
add eax, esi
push eax
push 0
push dword [esp + 0xcc]
push ebx
call fcn.00515890
add esp, 0x44
jmp 0x501ce3
cmp ax, word [esp + 0x78]
je 0x501b99
cmp ax, word [esp + 0x7c]
je 0x501b99
cmp ax, word [esp + 0x64]
je 0x501c21
cmp ax, word [esp + 0x68]
je 0x501c21
cmp ax, word [esp + 0x6c]
je 0x501c21
cmp ax, word [esp + 0x50]
je 0x501c21
mov edx, dword [esp + 0x3c]
cmp ax, dx
je 0x501c21
test ecx, ecx
je 0x501c71
push 1
push ebx
call fcn.004fc250
push 0
push 2
push 0
push 0x8b
push 0x20
push edi
call fcn.0051c640
add esp, 0x20
jmp 0x501c69
mov ecx, dword [esp + 0x48]
mov eax, dword [ebx + 0x14]
shr ecx, 1
cmp byte [ecx + eax], 0
je 0x501c21
push 2
push ebx
call fcn.004fc250
push dword [esp + 0x1c]
push 0x8d
push 0
push 1
push 0x20
push edi
call fcn.0051c640
mov eax, dword [esp + 0x34]
add eax, 4
push eax
push 0x8d
push 0
push 3
push 0x20
push edi
call fcn.0051c640
push 0
push 2
push dword [esp + 0x54]
push 0x8d
push 0x20
push edi
call fcn.0051c640
add esp, 0x50
push 0
push 1
push 0
push 0x8b
push 0x20
push edi
call fcn.0051c640
push 0
push 3
push 4
push 0x8b
push 0x20
push edi
call fcn.0051c640
add esp, 0x30
jmp 0x501c69
push dword [esp + 0x14]
push 0x8d
push 0
push 3
push 0x20
push edi
call fcn.0051c640
push 1
push ebx
call fcn.004fc250
push 0
push 2
push dword [esp + 0x3c]
push 0x8d
push 0x20
push edi
call fcn.0051c640
push 0
push 3
push 0
push 0x8b
push 0x20
push edi
call fcn.0051c640
add esp, 0x50
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x3c]
cmp ax, word [esp + 0x54]
je 0x501c7d
cmp ax, dx
jne 0x501cdf
movzx eax, word [ebp]
mov ecx, 0x90
cmp ax, cx
jne 0x501d68
mov ecx, dword [ebx + 0x24]
lea eax, [ecx + 4]
push eax
movzx eax, word [ebp + 2]
push 0x8d
lea eax, [ecx + eax*8]
push eax
push 0x8d
push 0
push edi
call fcn.0051ae50
add esp, 0x18
mov esi, eax
cmp dword [edi], 0
jne 0x501cd8
push 8
push edi
call fcn.00511ae0
add esp, 8
test eax, eax
je 0x501cd8
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + 0x20]
mov dword [eax + 4], ecx
mov dword [eax], esi
mov dword [edx + 0x20], eax
add ebp, 4
mov dword [esp + 0x20], ebp
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x44]
push ebp
push ecx
push eax
push ebx
call fcn.00506db0
add esp, 0x10
cmp dword [edi], 0
jne 0x50266d
mov esi, dword [esp + 0x24]
cmp si, word [esp + 0x64]
je 0x501d12
cmp si, word [esp + 0x68]
jne 0x501d2a
push dword [esp + 0x14]
push 0x8d
push 0
push 2
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
cmp si, word [esp + 0x34]
jne 0x502267
mov eax, dword [ebp + 0x20]
mov esi, dword [ebx]
test eax, eax
jns 0x502085
cmp eax, 0xffffffff
jne 0x501fec
push dword [esp + 0x14]
push 0x8d
push 0
push 0xb
push 0x20
push esi
call fcn.0051c640
add esp, 0x18
jmp 0x502024
mov ecx, 0x91
cmp ax, cx
jne 0x501e6d
mov eax, dword [esp + 0x20]
movzx ebp, word [ebp + 4]
push 0
push 2
movzx ecx, word [eax + 2]
imul ecx, dword [ebx + 0xb8]
mov eax, dword [ebx + 0xb0]
push 0
push 4
push 0x20
push edi
lea esi, [eax + ecx*2]
call fcn.0051c640
mov eax, dword [ebx + 0x24]
add eax, 4
push eax
push 0x8d
push 0
push 1
push 0x20
push edi
call fcn.0051c640
movzx ecx, word [esi]
mov eax, dword [ebx + 0x24]
push 0
push 1
lea eax, [eax + ecx*8]
push eax
push 0x8d
push 0
push 3
push 0x262
push edi
call fcn.0051c880
mov eax, dword [ebx + 0xb8]
dec ebp
add esp, 0x50
lea esi, [esi + eax*2]
test ebp, ebp
jle 0x501e37
nop dword [eax]
movzx ecx, word [esi]
dec ebp
mov eax, dword [ebx + 0x24]
push 0
push 1
lea eax, [eax + ecx*8]
push eax
push 0x8d
push 0
push 2
push 0x62
push edi
call fcn.0051c880
push 0
push 2
push 0
push 3
push 0
push 3
push 0x266
push edi
call fcn.0051c880
mov eax, dword [ebx + 0xb8]
add esp, 0x40
lea esi, [esi + eax*2]
test ebp, ebp
jg 0x501df0
push 0
push 4
push 0
push 2
push 0x20
push edi
call fcn.0051c640
push 0
push edi
call fcn.0051c380
mov ebp, dword [esp + 0x38]
push eax
lea eax, [ebp + 0x20]
push eax
push edi
call fcn.004fc220
mov eax, dword [esp + 0x4c]
add esp, 0x2c
add eax, 6
jmp 0x501ce7
mov ecx, dword [esp + 0x58]
cmp ax, word [esp + 0x60]
jb 0x501e7d
cmp ax, cx
jbe 0x501eed
mov edx, dword [esp + 0x5c]
cmp ax, dx
je 0x501ef1
push 0x24
push edi
call fcn.0051acc0
add esp, 8
cmp dword [edi], 0
jne 0x50266d
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x14], 0
push 1
mov dword [eax + 0x18], 0
push eax
mov dword [eax + 0x1c], 0
mov dword [eax + 0x20], 0
push ebp
mov dword [eax + 0x10], ebp
push ebx
mov dword [esi + 0x20], eax
call fcn.004fde10
mov ebp, dword [esp + 0x28]
add esp, 0x10
jmp 0x501ce7
mov edx, dword [esp + 0x5c]
mov dword [esi + 0x20], 0
movzx eax, word [ebp]
cmp ax, cx
jne 0x501f09
add ebp, 2
jmp 0x501cdb
mov ecx, 0x94
cmp ax, cx
je 0x501f5e
cmp ax, dx
je 0x501f5e
cmp ax, word [esp + 0x60]
jne 0x501f81
movzx esi, word [ebp + 2]
mov edx, dword [ebx + 0xd8]
mov eax, esi
test edx, edx
je 0x501f5e
mov ecx, 0xffff
cmp ax, cx
je 0x501cd8
mov edx, dword [edx + 0x14]
xor ecx, ecx
test edx, edx
jne 0x501f4b
test ax, ax
jmp 0x501f53
mov eax, dword [ebx + 8]
cmp si, word [eax + edx*2 + 4]
sete cl
test ecx, ecx
jne 0x501cd8
mov ebp, dword [esp + 0x44]
cmp word [ebp], 0x78
jne 0x501fe1
lea eax, [ebp + 4]
mov dword [esp + 0x20], eax
movzx eax, word [ebp + 2]
lea ebp, [ebp + eax*2]
mov dword [esp + 0x44], ebp
jmp 0x501cdf
mov eax, dword [ebx + 0xd8]
test eax, eax
je 0x501f5e
mov ebp, dword [eax + 0x14]
test ebp, ebp
je 0x501f5e
mov eax, dword [esp + 0x20]
mov esi, dword [ebx + 0xb8]
movzx ecx, word [eax + 2]
movzx edx, word [eax + 4]
mov eax, dword [ebx + 0xb0]
imul ecx, esi
lea ecx, [eax + ecx*2]
mov eax, dword [ebx + 8]
movzx eax, word [eax + ebp*2 + 4]
test edx, edx
je 0x501f5e
nop dword [eax]
cmp word [ecx], ax
je 0x501fcd
dec edx
lea ecx, [ecx + esi*2]
test edx, edx
jg 0x501fc0
test edx, edx
je 0x501f5e
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
add eax, 6
jmp 0x501ce7
mov eax, ebp
mov ebp, dword [esp + 0x18]
jmp 0x501ce7
mov ecx, dword [esp + 0x10]
xor eax, eax
cmp dword [esp + 0x30], eax
setne al
cmp cx, 0x79
jne 0x502006
cmp dword [esp + 0x1c], 0
je 0x502007
inc eax
test eax, eax
je 0x502028
shl eax, 2
push eax
push 0x40
push 0
push 0xb
push 0
push 0xb
push 0x60
push esi
call fcn.0051c880
add esp, 0x20
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x30], 0
je 0x50205b
cmp cx, 0x79
jne 0x502041
cmp dword [esp + 0x1c], 0
mov eax, 0xfffffffc
je 0x502046
mov eax, 0xfffffff8
push eax
push 0x8b
push 0
push 1
push 0x20
push esi
call fcn.0051c640
add esp, 0x18
mov eax, dword [esp + 0x10]
cmp ax, 0x7a
jne 0x502069
push 0xfffffffffffffffc
jmp 0x5020e5
cmp ax, 0x7b
jne 0x5020f9
push 0xfffffffffffffffc
push 0x8b
push dword [esp + 0x1c]
push 0x8d
jmp 0x5020ee
cmp word [esp + 0x10], 0x79
jne 0x502099
cmp dword [esp + 0x1c], 0
mov ecx, 1
je 0x50209e
mov ecx, 2
add eax, ecx
shl eax, 2
push eax
push 0x40
push dword [esp + 0x1c]
push 0x8d
push 0
push 0xb
push 0x62
push esi
call fcn.0051c880
add esp, 0x20
cmp dword [esp + 0x30], 0
je 0x5020db
push 0xfffffffffffffffc
push 0x8b
push 0
push 1
push 0x20
push esi
call fcn.0051c640
add esp, 0x18
cmp word [esp + 0x10], 0x7a
jne 0x5020f9
push 0
push 0x8b
push 0
push 3
push 0x20
push esi
call fcn.0051c640
add esp, 0x18
cmp dword [esp + 0x30], 0
je 0x502117
push 0
push 1
push dword [ebx + 0x44]
push 0x8d
push 0x20
push esi
call fcn.0051c640
add esp, 0x18
mov esi, dword [esp + 0x24]
xor edx, edx
cmp dword [esp + 0x38], 0x28
jne 0x502140
push dword [esp + 0x40]
push 0x8d
push edx
push 3
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
mov edx, 1
cmp word [esp + 0x10], 0x79
mov eax, 0x86
jne 0x502154
cmp word [esp + 0x2c], ax
je 0x502155
inc edx
mov ecx, dword [esp + 0x48]
mov eax, edx
test ecx, ecx
je 0x502175
inc edx
cmp dword [ebx + 0x48], 0
cmove edx, eax
mov eax, dword [ebx + 0x14]
shr ecx, 1
cmp byte [ecx + eax], 0
jne 0x502175
add edx, 2
cmp dword [esp + 0x1c], 0
je 0x502184
cmp si, word [esp + 0x34]
je 0x502184
inc edx
test edx, edx
je 0x502192
push edx
push ebx
call fcn.004fc250
add esp, 8
xor esi, esi
cmp dword [esp + 0x38], 0x28
jne 0x5021b8
push 1
push 0x40
push esi
push 3
push esi
push 0x8b
push 0x62
push edi
call fcn.0051c880
add esp, 0x20
mov esi, 1
mov ecx, dword [esp + 0x10]
cmp cx, 0x79
jne 0x5021ce
mov eax, 0x86
cmp word [esp + 0x2c], ax
je 0x5021fb
push 0
cmp cx, 0x79
mov edx, 0x40
mov eax, 2
cmove eax, edx
push eax
lea eax, [esi*4]
push eax
push 0x8b
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
inc esi
mov eax, dword [esp + 0x48]
test eax, eax
je 0x502214
push dword [esp + 0x14]
push eax
push esi
push ebx
call fcn.005180b0
add esp, 0x10
mov esi, eax
mov eax, dword [esp + 0x44]
mov edx, 1
cmp word [eax], 0x78
jne 0x502236
movzx ecx, word [eax + 2]
inc edx
cmp word [eax + ecx*2], 0x78
lea eax, [eax + ecx*2]
je 0x502223
mov dword [esp + 0x44], eax
cmp dword [esp + 0x1c], 0
je 0x5022ab
mov eax, dword [esp + 0x34]
cmp word [esp + 0x24], ax
je 0x502297
shl esi, 2
cmp edx, 3
jg 0x502285
push 0
push 0x40
push esi
push 0x8b
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
jmp 0x502297
cmp si, word [esp + 0x6c]
jne 0x50211b
push ebp
push dword [esp + 0x18]
push ebx
call fcn.00518200
add esp, 0xc
jmp 0x50211b
push esi
push 0x8b
push edi
call fcn.0051d110
add esp, 0xc
mov dword [ebp + 0x20], eax
cmp word [esp + 0x10], 0x7a
je 0x5022ab
push edi
call fcn.0051c410
add esp, 4
mov dword [ebp + 0x14], eax
mov edx, dword [esp + 0x48]
test edx, edx
je 0x5022de
mov eax, dword [ebx + 0x14]
mov ecx, edx
shr ecx, 1
cmp byte [ecx + eax], 0
je 0x5022de
mov eax, dword [ebx + 0x24]
push 0
push 2
lea eax, [eax + edx*4]
add eax, 4
push eax
push 0x8d
push 0x20
push edi
call fcn.0051c640
add esp, 0x18
cmp word [esp + 0x10], 0x7a
jne 0x502456
cmp dword [esp + 0x38], 0
je 0x502378
cmp dword [esp + 0x1c], 0
je 0x502308
push edi
call fcn.0051c410
add esp, 4
mov dword [ebp + 0x14], eax
mov eax, dword [esp + 0x40]
push 1
push 0x40
push eax
push 0x8d
push eax
push 0x8d
push 0x262
push edi
call fcn.0051c880
push 1
push edi
call fcn.0051c380
mov esi, dword [esp + 0x50]
add esp, 0x28
test eax, eax
je 0x50234d
test esi, esi
je 0x50234d
mov ecx, dword [eax + 8]
and ecx, 0xfffffffd
mov dword [eax + 0xc], esi
or ecx, 1
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x34]
cmp word [esp + 0x24], ax
je 0x502448
push 1
push ebx
call fcn.00514a10
add esp, 8
push edi
call fcn.0051c410
add esp, 4
mov dword [ebp + 0x18], eax
jmp 0x50245a
mov esi, dword [esp + 0x24]
lea eax, [esi - 0x86]
cmp ax, 4
ja 0x5023a4
push 0x22
push edi
call fcn.0051c380
mov esi, dword [esp + 0x30]
add esp, 8
test eax, eax
je 0x502448
jmp 0x502431
cmp dword [esp + 0x1c], 0
je 0x5023b7
push edi
call fcn.0051c410
add esp, 4
mov dword [ebp + 0x14], eax
push 0
push 2
cmp si, word [esp + 0x3c]
je 0x50241a
push dword [esp + 0x1c]
push 0x8d
push 1
push edi
call fcn.0051ae50
add esp, 0x18
test eax, eax
je 0x5023f1
mov esi, dword [esp + 0x28]
test esi, esi
je 0x5023f1
mov ecx, dword [eax + 8]
and ecx, 0xfffffffd
mov dword [eax + 0xc], esi
or ecx, 1
mov dword [eax + 8], ecx
mov eax, 0x96
cmp word [esp + 0x2c], ax
je 0x502444
push 1
push ebx
call fcn.00514a10
mov esi, dword [esp + 0x30]
add esp, 8
push edi
call fcn.0051c410
add esp, 4
mov dword [ebp + 0x18], eax
jmp 0x50245a
push 0
push 3
push 1
push edi
call fcn.0051ae50
add esp, 0x18
test eax, eax
je 0x502444
mov esi, dword [esp + 0x28]
test esi, esi
je 0x502444
mov ecx, dword [eax + 8]
and ecx, 0xfffffffd
mov dword [eax + 0xc], esi
or ecx, 1
mov dword [eax + 8], ecx
mov esi, dword [esp + 0x28]
push edi
call fcn.0051c410
add esp, 4
mov dword [ebp + 0x18], eax
jmp 0x50245a
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x38]
cmp eax, 0x29
jne 0x5024ac
push ebx
call fcn.0050d640
mov eax, dword [esp + 0x44]
push 1
push 0x40
push eax
push 0x8d
push eax
push 0x8d
push 0x262
push edi
call fcn.0051c880
push 1
push edi
call fcn.0051c380
add esp, 0x2c
test eax, eax
je 0x5024e4
test esi, esi
je 0x5024e4
mov ecx, dword [eax + 8]
and ecx, 0xfffffffd
mov dword [eax + 0xc], esi
or ecx, 1
mov dword [eax + 8], ecx
jmp 0x5024e4
cmp eax, 0x27
jne 0x5024e4
push dword [esp + 0x40]
push 0x8d
push 0
push 3
push 0x20
push edi
call fcn.0051c640
push 1
push ebx
call fcn.004fc250
push 0
push 3
push 0
push 0x8b
push 0x20
push edi
call fcn.0051c640
add esp, 0x38
mov eax, dword [esp + 0x2c]
mov edx, 0x96
cmp ax, dx
jne 0x502560
push edi
call fcn.0051c410
add esp, 4
mov dword [ebp + 0x1c], eax
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x2c]
mov edx, 0x96
cmp cx, 0x79
je 0x50251f
mov ecx, 0x97
cmp ax, cx
jne 0x502524
cmp ax, dx
jne 0x50252d
push ebx
call fcn.0050d640
add esp, 4
cmp si, word [esp + 0x34]
jne 0x502547
mov eax, dword [ebp + 0x20]
xor ecx, ecx
cmp dword [esp + 0x30], ecx
setne cl
add eax, eax
or ecx, eax
mov dword [ebp + 0x20], ecx
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x44]
add eax, 2
pop edi
pop esi
pop ebp
lea eax, [ecx + eax*2]
pop ebx
add esp, 0x78
ret
mov ecx, 0x97
cmp ax, cx
jne 0x502660
mov esi, dword [esp + 0x94]
push 0x22
push edi
mov esi, dword [esi + 0x14]
call fcn.0051c380
add esp, 8
test eax, eax
je 0x50259a
test esi, esi
je 0x50259a
mov ecx, dword [eax + 8]
and ecx, 0xfffffffd
mov dword [eax + 0xc], esi
or ecx, 1
mov dword [eax + 8], ecx
mov esi, dword [esp + 0x4c]
test esi, esi
je 0x5024fe
push edi
call fcn.0051c410
add esp, 4
test eax, eax
je 0x5025c2
mov ecx, dword [esi + 8]
and ecx, 0xfffffffd
mov dword [esi + 0xc], eax
or ecx, 1
mov dword [esi + 8], ecx
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x34]
cmp si, ax
jne 0x502625
cmp dword [ebp + 0x20], 0
jl 0x502625
push dword [esp + 0x14]
push 0x8d
push 0
push 0xb
push 0x20
push edi
call fcn.0051c640
push 0x23
push edi
call fcn.0051c380
push eax
lea eax, [ebx + 0xfc]
push eax
push edi
call fcn.004fc220
mov eax, dword [ebp + 0x20]
lea eax, [eax*4 - 4]
push eax
push 0x40
push 0
push 0xb
push 0
push 0xb
push 0x60
push edi
call fcn.0051c880
add esp, 0x4c
jmp 0x502502
mov ecx, dword [esp + 0x10]
cmp cx, 0x7b
jne 0x502506
cmp si, ax
je 0x502534
push 1
push ebx
call fcn.00514a10
mov eax, dword [esp + 0x88]
add esp, 8
mov ecx, dword [esp + 0x44]
add eax, 2
pop edi
pop esi
pop ebp
lea eax, [ecx + eax*2]
pop ebx
add esp, 0x78
ret
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x24]
jmp 0x50250f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x78
ret