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

Disassembly:
sub esp, 0x50
push ebx
mov ebx, dword [esp + 0x58]
xor eax, eax
push ebp
push esi
push edi
mov edi, dword [ebx]
mov dword [esp + 0x28], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x3c], eax
mov eax, dword [edi]
mov dword [esp + 0x64], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x20], 0x86
test eax, eax
je 0x5021d1
xor ebp, ebp
jmp 0x502222
mov eax, dword [edi + 0x30]
mov ecx, dword [eax + 4]
lea edx, [ecx + 0x28]
cmp edx, 0x7f8
ja 0x5021ec
lea ebp, [eax + 8]
mov dword [eax + 4], edx
add ebp, ecx
jmp 0x502220
mov eax, dword [edi + 0x28]
push dword [eax + 8]
mov eax, dword [eax]
push 0x800
call eax
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x50220e
mov dword [edi], 2
xor ebp, ebp
jmp 0x502220
mov eax, dword [edi + 0x30]
lea ebp, [ecx + 8]
mov dword [ecx], eax
mov dword [edi + 0x30], ecx
mov dword [ecx + 4], 0x28
mov eax, dword [edi]
mov dword [esp + 0x34], ebp
test eax, eax
jne 0x503324
mov edx, dword [esp + 0x6c]
xorps xmm0, xmm0
mov ecx, dword [esp + 0x68]
movups xmmword [ebp], xmm0
movups xmmword [ebp + 0x10], xmm0
movq qword [ebp + 0x20], xmm0
mov eax, dword [edx + 8]
mov dword [ebp], eax
mov dword [ebp + 0x10], ecx
mov dword [edx + 8], ebp
mov edx, 0x96
movzx eax, word [ecx]
lea esi, [edx + 1]
cmp ax, dx
je 0x502269
mov edx, eax
cmp ax, si
jne 0x502278
movzx edx, word [ecx + 2]
add ecx, 2
mov dword [esp + 0x20], eax
mov dword [esp + 0x68], ecx
movzx eax, dx
mov dword [esp + 0x18], eax
nop
movzx eax, word [ecx + 2]
lea ecx, [ecx + eax*2]
movzx eax, word [ecx]
cmp eax, 0x78
je 0x502280
mov dword [esp + 0x14], eax
cmp eax, 0x79
jne 0x5022f7
sub ecx, dword [ebx + 8]
mov esi, dword [ebx + 0xc]
mov eax, ecx
sar eax, 1
mov eax, dword [esi + eax*4]
test eax, eax
je 0x5022f7
mov dword [esp + 0x38], eax
lea eax, [ecx + 2]
sar eax, 1
mov eax, dword [esi + eax*4]
mov dword [esp + 0x50], eax
lea eax, [ecx + 4]
sar eax, 1
mov eax, dword [esi + eax*4]
mov dword [esp + 0x2c], eax
lea eax, [ecx + 6]
mov ecx, dword [esp + 0x2c]
sar eax, 1
mov eax, dword [esi + eax*4]
mov dword [esp + 0x4c], eax
cmp ecx, 0x27
jne 0x5022e4
mov dword [esp + 0x14], 0x7a
jmp 0x5022f7
mov eax, dword [esp + 0x14]
cmp ecx, 0x28
mov esi, 0x7b
cmove eax, esi
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x68]
mov dword [esp + 0x44], 0x8a
mov dword [esp + 0x54], 0x92
mov dword [esp + 0x58], 0x95
movzx eax, word [ecx + 2]
lea esi, [ecx + 4]
mov dword [esp + 0x10], esi
mov dword [esp + 0x5c], 0xa2
lea eax, [ecx + eax*2]
movzx ecx, word [eax]
mov dword [esp + 0x1c], eax
xor eax, eax
cmp ecx, 0x78
sete al
mov dword [esp + 0x24], eax
mov eax, 0x8f
cmp dx, word [esp + 0x44]
je 0x50234d
cmp dx, ax
jne 0x502375
movzx eax, word [esi]
cmp ax, word [esp + 0x54]
jb 0x50235e
cmp ax, word [esp + 0x58]
jbe 0x50236d
mov dword [esp + 0x24], 1
cmp ax, word [esp + 0x5c]
jne 0x502375
mov dword [esp + 0x24], 0
mov eax, 0x8b
cmp dx, word [esp + 0x44]
jne 0x502399
cmp ecx, 0x7a
je 0x50238f
cmp ecx, 0x7b
jne 0x502443
mov dword [esp + 0x18], 0x8f
jmp 0x5023d0
mov ecx, 0x88
cmp dx, cx
je 0x502414
mov ecx, 0x8d
cmp dx, cx
je 0x502414
mov ecx, 0x84
cmp dx, cx
je 0x5023d0
mov ecx, 0x85
cmp dx, cx
je 0x5023d0
cmp dx, ax
je 0x5023d0
mov eax, 0x8f
cmp dx, ax
jne 0x502443
mov edx, dword [esp + 0x68]
mov ecx, edx
sub ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
sar ecx, 1
mov eax, dword [eax + ecx*4]
mov dword [esp + 0x64], eax
mov dword [ebp + 0x24], eax
mov eax, 0x84
cmp word [esp + 0x18], ax
jne 0x502443
lea eax, [esp + 0x48]
push eax
push 0
push 0
push edx
push ebx
call fcn.00513f40
mov dword [ebp + 0x20], eax
add esp, 0x14
mov eax, dword [esp + 0x48]
mov dword [esp + 0x28], eax
jmp 0x502443
movzx ecx, word [esi]
mov eax, dword [ebx + 0x14]
lea edx, [ecx + ecx]
cmp byte [ecx + eax], 0
mov dword [esp + 0x40], edx
jne 0x50242f
mov eax, dword [ebx + 0x20]
lea eax, [eax + ecx*4]
jmp 0x502435
mov eax, dword [ebx + 0x24]
lea eax, [eax + edx*4]
add esi, 2
mov dword [esp + 0x64], eax
mov dword [ebp + 0x24], eax
mov dword [esp + 0x10], esi
mov edx, dword [esp + 0x14]
xor ecx, ecx
cmp dx, 0x7a
je 0x502461
cmp dx, 0x7b
jne 0x502466
mov eax, 0x97
cmp word [esp + 0x20], ax
je 0x502466
mov ecx, 1
mov ebp, 0x96
lea eax, [ecx + 1]
cmp word [esp + 0x20], bp
mov ebp, dword [esp + 0x34]
cmovne eax, ecx
test eax, eax
je 0x50248c
push eax
push ebx
call fcn.004fdb40
mov edx, dword [esp + 0x1c]
add esp, 8
xor eax, eax
cmp dx, 0x7a
je 0x5024a8
mov ecx, dword [esp + 0x20]
cmp dx, 0x7b
jne 0x5024c9
mov edx, 0x97
cmp cx, dx
je 0x5024c9
cmp dword [edi], eax
jne 0x5024c0
push 0
push 0x40
push 0
push 0x8b
push edi
call fcn.0050f720
add esp, 0x14
mov ecx, dword [esp + 0x20]
mov eax, 1
mov edx, 0x96
cmp cx, dx
jne 0x5024f7
shl eax, 2
cmp dword [edi], 0
jne 0x50268c
push 0
push 2
push eax
push 0x8b
push edi
call fcn.0050f720
add esp, 0x14
jmp 0x50268c
mov eax, 0x97
cmp word [esp + 0x20], ax
jne 0x50268c
cmp dword [edi], 0
jne 0x502520
push 0
push 0x8b
push 0
push 2
push edi
call fcn.0050f720
add esp, 0x14
cmp word [esp + 0x14], 0x7b
je 0x502559
push 4
push 0x40
push 0
push 0xb
push 0
push 0xb
push 0x60
push dword [ebx]
call fcn.0051aaf0
push 0
push 0x40
push 0
push 2
push 0
push edi
call fcn.00519da0
add esp, 0x38
mov dword [esp + 0x3c], eax
jmp 0x50268c
mov eax, dword [esp + 0x18]
mov ecx, 0x84
cmp ax, cx
je 0x5025ab
mov ecx, 0x8b
cmp ax, cx
jae 0x5025ab
push 0
push 0x40
push 0
push 2
push 1
push edi
call fcn.00519da0
push 4
push 0x8b
push 0
push 2
push 0x20
push edi
mov esi, eax
call fcn.0051a810
push edi
call fcn.0051a7a0
push eax
push esi
call fcn.0051bb30
add esp, 0x3c
jmp 0x502688
push 0
push 0x40
push 0
push 2
push 1
push edi
call fcn.00519da0
push 4
push 0x8b
push 0
push 2
push 0x20
push edi
mov esi, eax
call fcn.0051a810
push 0x18
push edi
call fcn.0051a710
push edi
mov dword [esp + 0x98], eax
call fcn.0051a7a0
add esp, 0x3c
mov ecx, eax
test esi, esi
je 0x502601
test ecx, ecx
je 0x502601
mov eax, dword [esi + 8]
and eax, 0xfffffffd
mov dword [esi + 0xc], ecx
or eax, 1
mov dword [esi + 8], eax
mov eax, 0x84
cmp word [esp + 0x18], ax
jne 0x50263d
cmp dword [ebp + 0x20], 0
jl 0x50263d
push dword [esp + 0x64]
push 0x8d
push 0
push 1
push 0x20
push edi
call fcn.0051a810
mov eax, 0xfffffffe
add esp, 0x18
sub eax, dword [ebp + 0x20]
mov ecx, 0x81
shl eax, 2
jmp 0x502646
mov eax, dword [esp + 0x64]
mov ecx, 0x8d
push eax
push ecx
push 0
push 2
push 0
push edi
call fcn.00519da0
push edi
mov esi, eax
call fcn.0051a7a0
mov edx, dword [esp + 0x78]
add esp, 0x1c
mov dword [esp + 0x3c], esi
mov ecx, eax
test edx, edx
je 0x502688
mov dword [esp + 0x3c], esi
test ecx, ecx
je 0x502688
mov eax, dword [edx + 8]
and eax, 0xfffffffd
mov dword [edx + 0xc], ecx
or eax, 1
mov dword [esp + 0x3c], esi
mov dword [edx + 8], eax
mov esi, dword [esp + 0x10]
cmp dword [esp + 0x2c], 0
je 0x5026c1
push dword [esp + 0x4c]
push 0x40
push dword [esp + 0x40]
push 0x8d
push 0x20
push edi
call fcn.0051a810
add esp, 0x18
cmp dword [esp + 0x2c], 0x29
jne 0x5026c1
push edi
call fcn.0051a7a0
add esp, 4
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x14]
cmp ax, 0x7b
jne 0x502751
push edi
call fcn.0051a7a0
add esp, 4
mov dword [ebp + 0x18], eax
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
mov edx, 0x84
cmp ax, dx
jne 0x5029ec
mov ecx, dword [esp + 0x28]
xor esi, esi
test ecx, ecx
je 0x50271a
push dword [ebx + 0x44]
push 0x8d
push esi
push 3
push 0x20
push edi
call fcn.0051a810
mov ecx, dword [esp + 0x40]
add esp, 0x18
mov esi, 1
mov eax, dword [ebp + 0x20]
test eax, eax
jns 0x5028f2
cmp word [esp + 0x14], 0x7b
jne 0x502798
add esi, 2
test ecx, ecx
jne 0x5027c5
push dword [esp + 0x64]
push 0x8d
push ecx
push 3
push 0x20
push edi
call fcn.0051a810
add esp, 0x18
jmp 0x5027c5
cmp ax, 0x7a
jne 0x5026db
push edi
call fcn.0051a7a0
mov ecx, dword [esp + 0x28]
add esp, 4
mov edx, eax
mov dword [esp + 0x30], edx
test ecx, ecx
je 0x5026df
mov eax, dword [esp + 0x18]
add eax, 0xffffff7a
cmp ax, 4
ja 0x5026df
cmp dword [esp + 0x2c], 0
jne 0x5026df
mov dword [ebp + 0x14], edx
jmp 0x5026df
cmp eax, 0xffffffff
jne 0x5027b5
push 0
push 0xb
push dword [esp + 0x6c]
push 0x8d
push 0x20
push edi
call fcn.0051a810
add esp, 0x18
cmp word [esp + 0x14], 0x7a
je 0x5027c4
cmp dword [esp + 0x24], 0
je 0x5027c5
inc esi
test esi, esi
je 0x5027d3
push esi
push ebx
call fcn.004fdb40
add esp, 8
mov ecx, dword [esp + 0x28]
xor esi, esi
test ecx, ecx
je 0x5027fc
push 0
push 3
push 0
push 0x8b
push 0x20
push edi
mov esi, 1
call fcn.0051a810
mov ecx, dword [esp + 0x40]
add esp, 0x18
mov eax, dword [esp + 0x14]
cmp ax, 0x7b
jne 0x5028d8
test ecx, ecx
je 0x502826
push dword [esp + 0x64]
push 0x8d
push 0
push 3
push 0x20
push edi
call fcn.0051a810
add esp, 0x18
push 0
push 2
shl esi, 2
push esi
push 0x8b
push 0x20
push edi
call fcn.0051a810
add esp, 0x18
cmp dword [ebp + 0x20], 0xffffffff
jne 0x50286f
xor eax, eax
cmp dword [esp + 0x28], eax
setne al
lea eax, [eax*4 + 4]
push eax
push 0x40
push 0
push 0xb
push dword [esp + 0x74]
push 0x8d
push 0x60
push edi
call fcn.0051aaf0
add esp, 0x20
push 0
push 3
lea eax, [esi + 4]
push eax
push 0x8b
push 0x20
push edi
call fcn.0051a810
add esp, 0x18
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
push ebp
push ecx
push eax
push ebx
call fcn.00507350
add esp, 0x10
cmp dword [edi], 0
jne 0x503324
mov eax, dword [esp + 0x18]
mov ecx, 0x84
cmp ax, cx
jne 0x502e7b
push dword [esp + 0x28]
mov esi, dword [esp + 0x18]
push dword [esp + 0x28]
push dword [esp + 0x6c]
push dword [ebp + 0x20]
push esi
push ebx
call fcn.005170c0
add esp, 0x18
jmp 0x502e97
cmp ax, 0x7a
je 0x5028e5
cmp dword [esp + 0x24], 0
je 0x502887
push 0
push 2
lea eax, [esi*4]
jmp 0x502876
cmp word [esp + 0x14], 0x79
jne 0x502901
cmp dword [esp + 0x24], 0
je 0x502902
inc esi
inc eax
add esi, eax
push esi
push ebx
call fcn.004fdb40
add esp, 8
cmp dword [esp + 0x28], 0
je 0x50292c
push 0
push 3
push 0
push 0x8b
push 0x20
push edi
call fcn.0051a810
add esp, 0x18
push dword [esp + 0x64]
push 0x8d
push 0
push 1
push 0x20
push edi
call fcn.0051a810
lea eax, [esi*4]
push eax
push 0x40
push 0
push 0xb
push 0
push 3
push 0x60
push edi
call fcn.0051aaf0
xor eax, eax
add esp, 0x38
cmp dword [esp + 0x28], eax
setne al
cmp word [esp + 0x14], 0x79
mov dword [esp + 0x4c], eax
jne 0x50297a
cmp dword [esp + 0x24], 0
je 0x502999
push 0
push 2
shl eax, 2
push eax
push 0x8b
push 0x20
push edi
call fcn.0051a810
mov esi, dword [esp + 0x64]
add esp, 0x18
inc esi
jmp 0x50299d
mov esi, dword [esp + 0x4c]
push 0
push 3
push dword [esp + 0x6c]
push 0x8d
push 0x20
push edi
call fcn.0051a810
push 0
push 1
lea eax, [esi*4]
push eax
push 0x8b
push 0x20
push edi
call fcn.0051a810
lea eax, [esi + 1]
push eax
mov eax, dword [ebp + 0x20]
add eax, esi
push eax
push 0
push dword [esp + 0xa4]
push ebx
call fcn.00514970
add esp, 0x44
jmp 0x502887
mov edx, 0x88
cmp ax, dx
je 0x502a55
mov edx, 0x8d
cmp ax, dx
je 0x502a55
mov edx, 0x85
cmp ax, dx
je 0x502ae7
mov edx, 0x8b
cmp ax, dx
je 0x502ae7
mov edx, 0x8f
cmp ax, dx
je 0x502ae7
test ecx, ecx
je 0x502b3b
push 1
push ebx
call fcn.004fdb40
push 0
push 2
push 0
push 0x8b
push 0x20
push edi
call fcn.0051a810
add esp, 0x20
jmp 0x502b32
mov ecx, dword [esp + 0x40]
mov eax, dword [ebx + 0x14]
shr ecx, 1
cmp byte [ecx + eax], 0
je 0x502ae7
push 2
push ebx
call fcn.004fdb40
push dword [esp + 0x6c]
push 0x8d
push 0
push 1
push 0x20
push edi
call fcn.0051a810
mov eax, dword [esp + 0x84]
add eax, 4
push eax
push 0x8d
push 0
push 3
push 0x20
push edi
call fcn.0051a810
push 0
push 2
push dword [esp + 0xa4]
push 0x8d
push 0x20
push edi
call fcn.0051a810
add esp, 0x50
push 0
push 1
push 0
push 0x8b
push 0x20
push edi
call fcn.0051a810
push 0
push 3
push 4
push 0x8b
push 0x20
push edi
call fcn.0051a810
add esp, 0x30
jmp 0x502b32
push dword [esp + 0x64]
push 0x8d
push 0
push 3
push 0x20
push edi
call fcn.0051a810
push 1
push ebx
call fcn.004fdb40
push 0
push 2
push dword [esp + 0x8c]
push 0x8d
push 0x20
push edi
call fcn.0051a810
push 0
push 3
push 0
push 0x8b
push 0x20
push edi
call fcn.0051a810
add esp, 0x50
mov eax, dword [esp + 0x18]
mov edx, 0x8f
mov ecx, 0x8a
cmp ax, cx
je 0x502b4e
cmp ax, dx
jne 0x502887
movzx eax, word [esi]
mov ecx, 0x90
cmp ax, cx
jne 0x502bac
mov ecx, dword [ebx + 0x24]
lea eax, [ecx + 4]
push eax
movzx eax, word [esi + 2]
push 0x8d
lea eax, [ecx + eax*8]
push eax
push 0x8d
push 0
push edi
call fcn.00519da0
add esp, 0x18
mov esi, eax
cmp dword [edi], 0
jne 0x502ba0
push 8
push edi
call fcn.00510f30
add esp, 8
test eax, eax
je 0x502ba0
mov ecx, dword [ebp + 0x20]
mov dword [eax + 4], ecx
mov dword [eax], esi
mov dword [ebp + 0x20], eax
mov eax, dword [esp + 0x10]
add eax, 4
jmp 0x50288b
mov ecx, 0x91
cmp ax, cx
jne 0x502cad
movzx ecx, word [esi + 2]
imul ecx, dword [ebx + 0xb0]
mov eax, dword [ebx + 0xa8]
movzx ebp, word [esi + 4]
push 0
push 2
push 0
push 4
push 0x20
push edi
lea esi, [eax + ecx*2]
call fcn.0051a810
mov eax, dword [ebx + 0x24]
add eax, 4
push eax
push 0x8d
push 0
push 1
push 0x20
push edi
call fcn.0051a810
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.0051aaf0
mov eax, dword [ebx + 0xb0]
dec ebp
add esp, 0x50
lea esi, [esi + eax*2]
test ebp, ebp
jle 0x502c77
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.0051aaf0
push 0
push 2
push 0
push 3
push 0
push 3
push 0x266
push edi
call fcn.0051aaf0
mov eax, dword [ebx + 0xb0]
add esp, 0x40
lea esi, [esi + eax*2]
test ebp, ebp
jg 0x502c30
push 0
push 4
push 0
push 2
push 0x20
push edi
call fcn.0051a810
push 0
push edi
call fcn.0051a710
mov ebp, dword [esp + 0x54]
push eax
lea eax, [ebp + 0x20]
push eax
push edi
call fcn.004fdb10
mov eax, dword [esp + 0x3c]
add esp, 0x2c
add eax, 6
jmp 0x50288b
mov ecx, 0x92
cmp ax, cx
mov ecx, 0x95
jb 0x502cc1
cmp ax, cx
jbe 0x502d2e
mov edx, 0xa2
cmp ax, dx
je 0x502d33
push 0x24
push edi
call fcn.00519c00
add esp, 8
cmp dword [edi], 0
jne 0x503324
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 esi
mov dword [eax + 0x10], esi
push ebx
mov dword [ebp + 0x20], eax
call fcn.004ff970
add esp, 0x10
jmp 0x50288b
mov edx, 0xa2
mov dword [ebp + 0x20], 0
movzx eax, word [esi]
cmp ax, cx
jne 0x502d4e
add esi, 2
mov dword [esp + 0x10], esi
jmp 0x502887
mov ecx, 0x94
cmp ax, cx
je 0x502e50
cmp ax, dx
je 0x502e50
mov ecx, 0x92
cmp ax, cx
jne 0x502de8
movzx esi, word [esi + 2]
mov ecx, dword [ebx + 0xd0]
mov eax, esi
test ecx, ecx
jne 0x502d92
mov ecx, dword [esp + 0x10]
xor edx, edx
test edx, edx
lea eax, [ecx + 4]
cmove eax, ecx
jmp 0x502e48
mov edx, 0xffff
cmp ax, dx
jne 0x502db2
mov ecx, dword [esp + 0x10]
mov edx, 1
test edx, edx
lea eax, [ecx + 4]
cmove eax, ecx
jmp 0x502e48
mov ecx, dword [ecx + 0x14]
xor edx, edx
test ecx, ecx
jne 0x502dcf
mov ecx, dword [esp + 0x10]
test ax, ax
sete dl
test edx, edx
lea eax, [ecx + 4]
cmove eax, ecx
jmp 0x502e48
mov eax, dword [ebx + 8]
cmp si, word [eax + ecx*2 + 4]
mov ecx, dword [esp + 0x10]
sete dl
test edx, edx
lea eax, [ecx + 4]
cmove eax, ecx
jmp 0x502e48
mov eax, dword [ebx + 0xd0]
test eax, eax
je 0x502e50
mov eax, dword [eax + 0x14]
mov dword [esp + 0x5c], eax
test eax, eax
je 0x502e50
mov eax, dword [esp + 0x10]
movzx edx, word [esi + 4]
mov esi, dword [ebx + 0xb0]
mov ebp, dword [esp + 0x5c]
movzx ecx, word [eax + 2]
mov eax, dword [ebx + 0xa8]
imul ecx, esi
lea ecx, [eax + ecx*2]
mov eax, dword [ebx + 8]
movzx eax, word [eax + ebp*2 + 4]
mov ebp, dword [esp + 0x34]
test edx, edx
je 0x502e50
nop
cmp word [ecx], ax
je 0x502e3d
dec edx
lea ecx, [ecx + esi*2]
test edx, edx
jg 0x502e30
test edx, edx
je 0x502e50
mov eax, dword [esp + 0x10]
add eax, 6
test edx, edx
jne 0x50288b
mov eax, dword [esp + 0x1c]
mov ecx, eax
cmp word [eax], 0x78
jne 0x50288f
add eax, 4
mov dword [esp + 0x10], eax
movzx eax, word [ecx + 2]
lea ecx, [ecx + eax*2]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], ecx
jmp 0x50288f
mov ecx, 0x85
cmp ax, cx
jne 0x502e93
push ebp
push dword [esp + 0x68]
push ebx
call fcn.00517260
add esp, 0xc
mov esi, dword [esp + 0x14]
xor edx, edx
cmp dword [esp + 0x2c], 0x28
jne 0x502ebc
push dword [esp + 0x38]
push 0x8d
push edx
push 3
push 0x20
push edi
call fcn.0051a810
add esp, 0x18
mov edx, 1
mov eax, 0x86
cmp si, 0x79
jne 0x502ece
cmp word [esp + 0x20], ax
je 0x502ecf
inc edx
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x502ef1
cmp dword [ebx + 0x48], 0
lea eax, [edx + 1]
cmove eax, edx
shr ecx, 1
mov edx, eax
mov eax, dword [ebx + 0x14]
cmp byte [ecx + eax], 0
jne 0x502ef1
add edx, 2
cmp dword [esp + 0x24], 0
je 0x502f05
mov eax, 0x84
cmp word [esp + 0x18], ax
je 0x502f05
inc edx
test edx, edx
je 0x502f13
push edx
push ebx
call fcn.004fdb40
add esp, 8
xor esi, esi
cmp dword [esp + 0x2c], 0x28
jne 0x502f39
push 1
push 0x40
push esi
push 3
push esi
push 0x8b
push 0x62
push edi
call fcn.0051aaf0
add esp, 0x20
mov esi, 1
mov ecx, dword [esp + 0x14]
cmp cx, 0x79
jne 0x502f4f
mov eax, 0x86
cmp word [esp + 0x20], ax
je 0x502f7c
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.0051a810
add esp, 0x18
inc esi
mov eax, dword [esp + 0x40]
test eax, eax
je 0x502f95
push dword [esp + 0x64]
push eax
push esi
push ebx
call fcn.00516f20
add esp, 0x10
mov esi, eax
mov eax, dword [esp + 0x1c]
mov edx, 1
cmp word [eax], 0x78
jne 0x502fb7
movzx ecx, word [eax + 2]
inc edx
cmp word [eax + ecx*2], 0x78
lea eax, [eax + ecx*2]
je 0x502fa4
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x24], 0
je 0x503013
mov eax, 0x84
cmp word [esp + 0x18], ax
je 0x502ffb
shl esi, 2
cmp edx, 3
jg 0x502fe9
push 0
push 0x40
push esi
push 0x8b
push 0x20
push edi
call fcn.0051a810
add esp, 0x18
jmp 0x502ffb
push esi
push 0x8b
push edi
call fcn.0051b240
add esp, 0xc
mov dword [ebp + 0x20], eax
mov esi, dword [esp + 0x14]
cmp si, 0x7a
je 0x503017
push edi
call fcn.0051a7a0
add esp, 4
mov dword [ebp + 0x14], eax
jmp 0x503017
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x40]
test edx, edx
je 0x50304a
mov eax, dword [ebx + 0x14]
mov ecx, edx
shr ecx, 1
cmp byte [ecx + eax], 0
je 0x50304a
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.0051a810
add esp, 0x18
cmp si, 0x7a
jne 0x503163
cmp dword [esp + 0x2c], 0
je 0x5030c5
cmp dword [esp + 0x24], 0
je 0x50306e
push edi
call fcn.0051a7a0
add esp, 4
mov dword [ebp + 0x14], eax
mov eax, dword [esp + 0x38]
push 1
push 0x40
push eax
push 0x8d
push eax
push 0x8d
push 0x262
push edi
call fcn.0051aaf0
add esp, 0x20
push dword [esp + 0x30]
push 1
push edi
call fcn.0051a710
add esp, 8
push eax
call fcn.0051bb30
mov eax, 0x84
add esp, 8
cmp word [esp + 0x18], ax
je 0x503157
push 1
push ebx
call fcn.00513e60
jmp 0x503154
mov eax, dword [esp + 0x18]
add eax, 0xffffff7a
cmp ax, 4
ja 0x5030e5
push dword [esp + 0x30]
push 0x18
push edi
call fcn.0051a710
add esp, 8
jmp 0x50314e
cmp dword [esp + 0x24], 0
je 0x5030f8
push edi
call fcn.0051a7a0
add esp, 4
mov dword [ebp + 0x14], eax
push dword [esp + 0x30]
mov eax, 0x84
push 0
push 2
cmp word [esp + 0x24], ax
je 0x50313f
push dword [esp + 0x70]
push 0x8d
push 1
push edi
call fcn.00519da0
add esp, 0x18
push eax
call fcn.0051bb30
mov eax, 0x96
add esp, 8
cmp word [esp + 0x20], ax
je 0x503157
push 1
push ebx
call fcn.00513e60
jmp 0x503154
push 0
push 3
push 1
push edi
call fcn.00519da0
add esp, 0x18
push eax
call fcn.0051bb30
add esp, 8
push edi
call fcn.0051a7a0
add esp, 4
mov dword [ebp + 0x18], eax
mov eax, dword [esp + 0x2c]
cmp eax, 0x29
jne 0x5031ae
push ebx
call fcn.0050d290
mov eax, dword [esp + 0x3c]
push 1
push 0x40
push eax
push 0x8d
push eax
push 0x8d
push 0x262
push edi
call fcn.0051aaf0
add esp, 0x24
push dword [esp + 0x30]
push 1
push edi
call fcn.0051a710
add esp, 8
push eax
call fcn.0051bb30
add esp, 8
jmp 0x5031e6
cmp eax, 0x27
jne 0x5031e6
push dword [esp + 0x38]
push 0x8d
push 0
push 3
push 0x20
push edi
call fcn.0051a810
push 1
push ebx
call fcn.004fdb40
push 0
push 3
push 0
push 0x8b
push 0x20
push edi
call fcn.0051a810
add esp, 0x38
mov eax, dword [esp + 0x20]
mov ecx, 0x96
cmp ax, cx
jne 0x50325a
push edi
call fcn.0051a7a0
add esp, 4
mov dword [ebp + 0x1c], eax
mov eax, dword [esp + 0x20]
mov edx, 0x97
lea ecx, [edx - 1]
cmp si, 0x79
je 0x503217
cmp ax, dx
jne 0x50321c
cmp ax, cx
jne 0x503225
push ebx
call fcn.0050d290
add esp, 4
mov eax, 0x84
cmp word [esp + 0x18], ax
jne 0x503244
mov eax, dword [ebp + 0x20]
xor ecx, ecx
cmp dword [esp + 0x28], ecx
setne cl
add eax, eax
or ecx, eax
mov dword [ebp + 0x20], ecx
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x1c]
add eax, 2
pop edi
pop esi
pop ebp
lea eax, [ecx + eax*2]
pop ebx
add esp, 0x50
ret
mov edx, 0x97
cmp ax, dx
jne 0x50320c
mov eax, dword [esp + 0x6c]
push dword [eax + 0x14]
push 0x18
push edi
call fcn.0051a710
add esp, 8
push eax
call fcn.0051bb30
add esp, 8
cmp dword [esp + 0x3c], 0
je 0x503200
push edi
call fcn.0051a7a0
push eax
push dword [esp + 0x44]
call fcn.0051bb30
mov eax, dword [esp + 0x24]
mov ecx, 0x84
add esp, 0xc
cmp ax, cx
jne 0x503301
cmp dword [ebp + 0x20], 0
jl 0x503301
push dword [esp + 0x64]
push 0x8d
push 0
push 0xb
push 0x20
push edi
call fcn.0051a810
push 0x19
push edi
call fcn.0051a710
push eax
lea eax, [ebx + 0xf4]
push eax
push edi
call fcn.004fdb10
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.0051aaf0
add esp, 0x4c
jmp 0x503200
cmp si, 0x7b
jne 0x503200
cmp ax, cx
je 0x503231
push 1
push ebx
call fcn.00513e60
add esp, 8
jmp 0x503225
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x50
ret