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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
push ebx
push esi
mov esi, dword [ebp + 8]
xor edx, edx
push edi
mov eax, dword [esi + 0xd8]
mov ebx, dword [esi]
mov dword [esp + 0x44], ebx
mov ecx, dword [eax + 0x14]
mov eax, dword [esi + 8]
lea edi, [eax + ecx*2]
mov eax, 0x86
cmp word [edi], ax
mov ecx, edi
setne dl
lea edx, [edx*2 + 4]
add edx, edi
mov dword [esp + 0x18], edx
movzx eax, word [ecx + 2]
cmp word [ecx + eax*2], 0x78
lea ecx, [ecx + eax*2]
je 0x507763
lea eax, [esp + 0x10]
mov dword [esp + 0x24], ecx
push eax
push ecx
push edx
push esi
mov dword [esp + 0x20], 0
call fcn.005151d0
mov dword [esp + 0x2c], eax
add esp, 0x10
xor eax, eax
mov dword [esp + 0x2c], 0
xor edx, edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x4c], edx
mov ecx, edi
mov dword [esp + 0x30], eax
mov dword [esi + 0x1c], eax
nop
movzx eax, word [ecx + 2]
inc edx
cmp word [ecx + eax*2], 0x78
lea ecx, [ecx + eax*2]
je 0x5077b0
push ebx
mov dword [esp + 0x24], edx
mov dword [esp + 0x2c], 0
call fcn.0051c410
mov ecx, dword [esi + 0xd8]
add esp, 4
mov dword [ecx + 4], eax
mov eax, dword [esi + 0xd8]
mov edx, dword [eax + 0xc]
mov esi, dword [eax + 4]
test edx, edx
je 0x507810
nop dword [eax]
mov ecx, dword [edx]
test ecx, ecx
je 0x507809
test esi, esi
je 0x507809
mov eax, dword [ecx + 8]
and eax, 0xfffffffd
mov dword [ecx + 0xc], esi
or eax, 1
mov dword [ecx + 8], eax
mov edx, dword [edx + 4]
test edx, edx
jne 0x5077f0
push 0
push 3
push ebx
call fcn.0051b690
mov esi, dword [ebp + 8]
push esi
call fcn.0050d640
xor eax, eax
cmp dword [esp + 0x30], 1
setg al
inc eax
mov dword [esp + 0x24], eax
add eax, dword [esp + 0x2c]
push eax
push esi
mov dword [esp + 0x50], eax
call fcn.004fc250
mov eax, dword [esp + 0x2c]
push 0
push 3
lea eax, [eax*4 - 4]
push eax
push 0x8b
push 0x20
push ebx
mov dword [esp + 0x80], eax
call fcn.0051c640
push dword [esp + 0x40]
push dword [esp + 0x6c]
push dword [esp + 0x4c]
push 0
push dword [esp + 0x64]
push dword [esp + 0x5c]
push esi
call fcn.0050c790
add esp, 0x4c
push 0
push 0xb
push dword [esi + 0x30]
push 0x8d
push 0x20
push ebx
call fcn.0051c640
add esp, 0x18
test byte [esp + 0x10], 0x10
je 0x5078b9
push 0
push 0x40
push dword [esi + 0x44]
push 0x8d
push 0x20
push ebx
call fcn.0051c640
add esp, 0x18
cmp dword [esp + 0x20], 1
jle 0x5078d6
push 0
push 2
push 0
push 0x8b
push 0x20
push ebx
call fcn.0051c640
add esp, 0x18
mov edx, dword [esp + 0x18]
xorps xmm0, xmm0
movlpd qword [esp + 0x58], xmm0
mov ecx, edx
mov dword [esp + 0x68], 0
mov dword [esi + 0xc0], 0
mov dword [esi + 0xc8], 0
mov dword [esi + 0xe0], 0
mov dword [esi + 0xf0], 0
mov dword [esp + 0x68], ecx
movzx eax, word [edi + 2]
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
lea edi, [edi + eax*2]
mov dword [esp + 0x48], edi
cmp ecx, edx
je 0x50795e
cmp dword [ebx], 0
jne 0x50795e
push 0
push 0x8b
push 0
push 2
push 1
push ebx
call fcn.00511740
add esp, 0x18
test eax, eax
je 0x50795a
mov byte [eax], 0x8b
mov ecx, dword [esp + 0x68]
lea eax, [esp + 0x58]
push eax
push edi
push ecx
push esi
call fcn.00506db0
add esp, 0x10
cmp dword [ebx], 0
jne 0x50854a
cmp dword [esp + 0x20], 1
jg 0x50798a
test byte [esp + 0x10], 2
mov eax, 4
je 0x50798f
mov eax, 8
mov esi, dword [esi]
push eax
push 0x40
push 0
push 0xb
push 0
push 0xb
push 0x62
push esi
call fcn.0051c880
push 0
push 0xa
push 0
push 0xb
push 2
push esi
call fcn.0051ae50
mov edx, dword [ebp + 8]
add esp, 0x38
mov ebx, eax
mov edi, dword [edx]
cmp dword [edi], 0
jne 0x5079f6
push 0xc
push edi
call fcn.00511ae0
mov esi, eax
add esp, 8
test esi, esi
je 0x5079fa
push edi
mov dword [esi], ebx
call fcn.0051c410
mov edi, dword [ebp + 8]
add esp, 4
mov dword [esi + 4], eax
mov eax, dword [edi + 0xd0]
mov dword [esi + 8], eax
mov dword [edi + 0xd0], esi
jmp 0x5079fd
mov edi, edx
jmp 0x5079fd
mov edi, dword [ebp + 8]
mov ebx, dword [esp + 0x44]
mov eax, dword [edi + 0x30]
cmp dword [ebx], 0
jne 0x507a28
add eax, 0x20
push eax
push 0x8d
push 0
push 3
push 1
push ebx
call fcn.00511740
add esp, 0x18
test eax, eax
je 0x507a28
mov byte [eax], 0x8b
mov eax, dword [esp + 0x20]
cmp eax, 1
jg 0x507a38
test byte [esp + 0x10], 2
je 0x507a6b
cmp eax, 3
jle 0x507a53
push 4
push 0x8b
push ebx
call fcn.0051d110
add esp, 0xc
mov dword [esp + 0x30], eax
jmp 0x507a6b
push dword [esp + 0x28]
push 0x40
push 4
push 0x8b
push 0x20
push ebx
call fcn.0051c640
add esp, 0x18
push 0x22
push ebx
call fcn.0051c380
add esp, 8
mov esi, eax
cmp dword [ebx], 0
jne 0x507a99
push 8
push ebx
call fcn.00511ae0
add esp, 8
test eax, eax
je 0x507a99
mov ecx, dword [esp + 0x2c]
mov dword [eax + 4], ecx
mov dword [eax], esi
mov dword [esp + 0x2c], eax
cmp dword [esp + 0x28], 0
jne 0x507c87
cmp dword [ebx], 0
je 0x507aad
xor esi, esi
jmp 0x507b02
mov esi, dword [ebx + 0x18]
test esi, esi
je 0x507abc
mov eax, dword [esi + 8]
cmp eax, dword [ebx + 0x4c]
je 0x507b02
push 0xc
push ebx
call fcn.00511ae0
mov esi, eax
add esp, 8
test esi, esi
je 0x507b02
mov dword [esi], 0
mov eax, dword [ebx + 0x4c]
mov dword [esi + 8], eax
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x507ae4
mov dword [eax], esi
jmp 0x507ae7
mov dword [ebx + 8], esi
push 2
push ebx
mov dword [ebx + 0x18], esi
call fcn.00511b40
add esp, 8
test eax, eax
jne 0x507afd
xor esi, esi
jmp 0x507b02
mov word [eax], 0
mov eax, dword [edi + 0xd8]
mov dword [eax + 8], esi
mov eax, dword [edi + 0xd8]
mov edx, dword [eax + 0x10]
mov esi, dword [eax + 8]
test edx, edx
je 0x507b40
nop dword [eax + eax]
mov ecx, dword [edx]
test ecx, ecx
je 0x507b39
test esi, esi
je 0x507b39
mov eax, dword [ecx + 8]
and eax, 0xfffffffd
mov dword [ecx + 0xc], esi
or eax, 1
mov dword [ecx + 8], eax
mov edx, dword [edx + 4]
test edx, edx
jne 0x507b20
cmp dword [ebx], 0
jne 0x507b5e
push 2
push ebx
call fcn.00511b40
add esp, 8
test eax, eax
je 0x507b5e
mov byte [eax], 1
inc dword [ebx + 0x4c]
mov byte [eax + 1], 0x58
mov esi, dword [esp + 0x10]
and esi, 2
je 0x507b81
push 0xffffffffffffffff
push 0x40
push 4
push 0x8b
push 0
push ebx
call fcn.0051ae50
add esp, 0x18
mov dword [esp + 0x4c], eax
cmp dword [ebx], 0
jne 0x507ba3
push 0
push 0x8b
push 0
push 3
push 1
push ebx
call fcn.00511740
add esp, 0x18
test eax, eax
je 0x507ba3
mov byte [eax], 0x8b
push 0
push 1
push dword [esp + 0x58]
push 0x83
push 0x20
push ebx
call fcn.0051c640
push dword [esp + 0x28]
push dword [esp + 0x54]
push dword [esp + 0x34]
push 4
push dword [esp + 0x4c]
push dword [esp + 0x44]
push edi
call fcn.0050c790
mov edi, dword [esp + 0x54]
add esp, 0x34
cmp edi, 1
jle 0x507c5d
push 4
push 0x8b
push 0
push 1
push 0x20
push ebx
call fcn.0051c640
mov esi, dword [ebp + 8]
push 8
push 0x40
push 0
push 0xb
push 0
push 0xb
push 0x60
push dword [esi]
call fcn.0051c880
add esp, 0x38
push 0
cmp edi, 3
jle 0x507c43
push 1
push 0x22
push ebx
call fcn.0051c2a0
push ebx
call fcn.0051c410
mov ecx, dword [esp + 0x44]
add esp, 0x14
test ecx, ecx
je 0x507c33
mov dword [ecx + 4], eax
push 8
push ebx
call fcn.0051c480
add esp, 8
jmp 0x507cef
push 0x40
push 0
push 1
push 1
push ebx
call fcn.0051ae50
add esp, 0x18
mov dword [esp + 0x34], eax
jmp 0x507cef
xor eax, eax
test esi, esi
mov esi, dword [ebp + 8]
setne al
lea eax, [eax*4 + 4]
push eax
push 0x40
push 0
push 0xb
push 0
push 0xb
push 0x60
push dword [esi]
call fcn.0051c880
add esp, 0x20
jmp 0x507cef
mov esi, dword [esp + 0x20]
push ebx
call fcn.0051c410
add esp, 4
cmp esi, 3
jle 0x507cb1
mov ecx, dword [esp + 0x30]
test ecx, ecx
je 0x507ca4
mov dword [ecx + 4], eax
push 8
push ebx
call fcn.0051c480
add esp, 8
jmp 0x507cec
mov edx, dword [esp + 0x34]
test edx, edx
je 0x507ccc
test eax, eax
je 0x507ccc
mov ecx, dword [edx + 8]
and ecx, 0xfffffffd
mov dword [edx + 0xc], eax
or ecx, 1
mov dword [edx + 8], ecx
mov eax, dword [esp + 0x28]
inc eax
cmp eax, esi
jge 0x507cec
push 1
push 0x40
push 0
push 1
push 1
push ebx
call fcn.0051ae50
add esp, 0x18
mov dword [esp + 0x34], eax
mov esi, dword [ebp + 8]
mov edi, dword [esp + 0x60]
inc dword [esp + 0x28]
mov ebx, dword [esi]
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x54], eax
test edi, edi
je 0x507f09
cmp dword [edi + 4], 0
je 0x507da3
cmp dword [ebx], 0
je 0x507d23
xor esi, esi
jmp 0x507d78
mov esi, dword [ebx + 0x18]
test esi, esi
je 0x507d32
mov eax, dword [esi + 8]
cmp eax, dword [ebx + 0x4c]
je 0x507d78
push 0xc
push ebx
call fcn.00511ae0
mov esi, eax
add esp, 8
test esi, esi
je 0x507d78
mov dword [esi], 0
mov eax, dword [ebx + 0x4c]
mov dword [esi + 8], eax
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x507d5a
mov dword [eax], esi
jmp 0x507d5d
mov dword [ebx + 8], esi
push 2
push ebx
mov dword [ebx + 0x18], esi
call fcn.00511b40
add esp, 8
test eax, eax
jne 0x507d73
xor esi, esi
jmp 0x507d78
mov word [eax], 0
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x507da0
nop
mov edx, dword [ecx]
test edx, edx
je 0x507d99
test esi, esi
je 0x507d99
mov eax, dword [edx + 8]
and eax, 0xfffffffd
mov dword [edx + 0xc], esi
or eax, 1
mov dword [edx + 8], eax
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x507d80
mov esi, dword [ebp + 8]
mov ecx, dword [edi + 0x10]
movzx eax, word [ecx]
add eax, 0xfffffffd
cmp eax, 0xa5
ja case.0x507dbe.4
movzx eax, byte [eax + 0x508590]
jmp dword [eax*4 + 0x508554]
push 0
push 0x8b
push 0
push 1
push 0x20
push ebx
call fcn.0051c640
push 4
push 0x40
push 0
push 0xb
push 0
push 0xb
push 0x60
push dword [esi]
call fcn.0051c880
push 0
push 1
push dword [esi + 0x24]
push 0x8d
push 0x20
push ebx
call fcn.0051c640
add esp, 0x50
jmp case.0x507dbe.4
push edi
push esi
call fcn.00505350
add esp, 8
jmp case.0x507dbe.4
push edi
push esi
call fcn.00508810
add esp, 8
jmp case.0x507dbe.4
cmp dword [edi + 0x1c], 0
mov ebx, dword [esi]
jne 0x507eb1
mov esi, dword [edi + 0x18]
push 0x23
push ebx
mov edi, dword [esi + 8]
call fcn.0051c380
add esp, 8
test edi, edi
jne 0x507e6b
cmp dword [ebx], 0
mov edi, eax
jne 0x507e7e
push 8
push ebx
call fcn.00511ae0
add esp, 8
test eax, eax
je 0x507e7e
mov ecx, dword [esi + 0x10]
mov dword [eax + 4], ecx
mov dword [eax], edi
mov dword [esi + 0x10], eax
jmp 0x507e7e
test eax, eax
je 0x507e7e
mov ecx, dword [eax + 8]
and ecx, 0xfffffffd
mov dword [eax + 0xc], edi
or ecx, 1
mov dword [eax + 8], ecx
mov edi, dword [esp + 0x40]
push 0
push 0x40
push 0
mov esi, dword [edi + 0x14]
push 1
push 1
push ebx
call fcn.0051ae50
add esp, 0x18
test eax, eax
je 0x507ebd
test esi, esi
je 0x507ebd
mov ecx, dword [eax + 8]
and ecx, 0xfffffffd
mov dword [eax + 0xc], esi
or ecx, 1
mov dword [eax + 8], ecx
jmp 0x507ebd
push dword [edi + 8]
push esi
call fcn.004ff7e0
add esp, 8
push ebx
call fcn.0051c410
mov edx, dword [edi + 0xc]
add esp, 4
mov esi, eax
test edx, edx
je 0x507ef0
nop
mov ecx, dword [edx]
test ecx, ecx
je 0x507ee9
test esi, esi
je 0x507ee9
mov eax, dword [ecx + 8]
and eax, 0xfffffffd
mov dword [ecx + 0xc], esi
or eax, 1
mov dword [ecx + 8], eax
mov edx, dword [edx + 4]
test edx, edx
jne 0x507ed0
mov ebx, dword [esp + 0x3c]
mov esi, dword [ebp + 8]
mov edi, dword [edi]
mov dword [esp + 0x40], edi
test edi, edi
jne 0x507d10
mov eax, dword [esp + 0x54]
mov ebx, dword [esp + 0x44]
mov dword [esi + 0x1c], eax
cmp dword [ebx], 0
jne 0x50854a
mov esi, dword [ebx + 0x18]
test esi, esi
je 0x507f2c
mov eax, dword [esi + 8]
cmp eax, dword [ebx + 0x4c]
je 0x5081bb
push 0xc
push ebx
call fcn.00511ae0
mov esi, eax
add esp, 8
test esi, esi
jne 0x508186
jmp 0x5081bb
push edi
push esi
call fcn.004fdaf0
add esp, 8
jmp case.0x507dbe.4
push edi
push esi
call fcn.004ffd00
add esp, 8
jmp case.0x507dbe.4
mov eax, 0x81
push edi
push esi
cmp word [ecx + 2], ax
jbe 0x507f48
call fcn.004ffd00
add esp, 8
jmp case.0x507dbe.4
push edi
push esi
call fcn.00502680
add esp, 8
jmp case.0x507dbe.4
mov eax, 0x81
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 4], 0
cmp word [ecx + 2], ax
jbe 0x507fbd
push edi
push ecx
push esi
call fcn.005012c0
push dword [edi + 8]
push esi
call fcn.004ffd00
add esp, 0x14
jmp case.0x507dbe.4
mov eax, dword [edi + 0x14]
xorps xmm0, xmm0
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x6c]
push 0
push eax
push ecx
push esi
movlpd qword [esp + 0x7c], xmm0
movlpd qword [esp + 0x84], xmm0
movlpd qword [esp + 0x90], xmm0
mov dword [esp + 0x98], 0
mov dword [esp + 0x8c], ecx
call fcn.004fde10
add esp, 0x10
jmp case.0x507dbe.4
mov eax, dword [esi + 0x78]
neg eax
sbb eax, eax
and eax, 0x10
push eax
push 0x8b
push 0
push 1
push 0x20
push ebx
call fcn.0051c640
add esp, 0x18
cmp dword [esi + 0x78], 0
je 0x508045
push 0
push 0x8b
push 0
push 3
push 0x20
push ebx
call fcn.0051c640
add esp, 0x18
cmp dword [esi + 0x78], 0
mov ecx, 0x14
mov eax, 4
cmovne eax, ecx
push eax
push 0x40
push 0
push 0xb
push 0
push 0xb
push 0x60
push dword [esi]
call fcn.0051c880
push 0
push 1
push dword [esi + 0x40]
push 0x8d
push 0x20
push ebx
call fcn.0051c640
add esp, 0x38
cmp dword [esi + 0x78], 0
je case.0x507dbe.4
push 0
push 3
push dword [esi + 0x44]
push 0x8d
push 0x20
push ebx
call fcn.0051c640
add esp, 0x18
jmp case.0x507dbe.4
push edi
push esi
call fcn.00504c30
add esp, 8
jmp case.0x507dbe.4
cmp dword [esi + 0x84], 0
jne 0x5080d2
push 0xffffffffffffffff
push 0x40
push 0
push 1
push 0x20
push ebx
call fcn.0051c640
add esp, 0x18
mov esi, dword [esi + 0xc0]
push 0x22
push ebx
call fcn.0051c380
add esp, 8
test esi, esi
jne 0x508120
cmp dword [ebx], 0
mov esi, eax
jne 0x507ef4
push 8
push ebx
call fcn.00511ae0
add esp, 8
test eax, eax
je 0x507ef4
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0xe0]
mov dword [eax], esi
mov esi, edx
mov dword [eax + 4], ecx
mov dword [esi + 0xe0], eax
jmp case.0x507dbe.4
test eax, eax
je 0x507ef4
mov ecx, dword [eax + 8]
and ecx, 0xfffffffd
mov dword [eax + 0xc], esi
or ecx, 1
mov dword [eax + 8], ecx
jmp 0x507ef4
push ebx
call fcn.0051c410
mov edx, dword [edi + 0xc]
add esp, 4
mov esi, eax
test edx, edx
je 0x507ef4
mov ecx, dword [edx]
test ecx, ecx
je 0x50816b
test esi, esi
je 0x50816b
mov eax, dword [ecx + 8]
and eax, 0xfffffffd
mov dword [ecx + 0xc], esi
or eax, 1
mov dword [ecx + 8], eax
mov edx, dword [edx + 4]
test edx, edx
jne 0x508152
jmp 0x507ef4
push edi
push esi
call fcn.0050a7b0
add esp, 8
jmp case.0x507dbe.4
mov dword [esi], 0
mov eax, dword [ebx + 0x4c]
mov dword [esi + 8], eax
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x50819d
mov dword [eax], esi
jmp 0x5081a0
mov dword [ebx + 8], esi
push 2
push ebx
mov dword [ebx + 0x18], esi
call fcn.00511b40
add esp, 8
test eax, eax
jne 0x5081b6
xor esi, esi
jmp 0x5081bb
mov word [eax], 0
mov ecx, dword [esp + 0x64]
test ecx, ecx
je 0x5081e3
mov edx, dword [ecx]
test edx, edx
je 0x5081dc
test esi, esi
je 0x5081dc
mov eax, dword [edx + 8]
and eax, 0xfffffffd
mov dword [edx + 0xc], esi
or eax, 1
mov dword [edx + 8], eax
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x5081c3
mov edi, dword [esp + 0x48]
cmp word [edi], 0x78
jne 0x5081fc
mov esi, dword [ebp + 8]
lea ecx, [edi + 4]
mov edx, dword [esp + 0x18]
jmp 0x507915
push ebx
call fcn.0051c410
push dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
mov edi, eax
mov eax, dword [esp + 0x1c]
add ecx, eax
mov esi, dword [ebp + 8]
push ecx
push eax
push 1
push dword [esp + 0x38]
push dword [esp + 0x30]
push esi
call fcn.0050c790
mov eax, dword [esp + 0x34]
lea eax, [eax*4 - 4]
push eax
push 0x8b
push 0
push 3
push 0x20
push ebx
call fcn.0051c640
mov eax, dword [esp + 0x4c]
add eax, dword [esp + 0x54]
shl eax, 2
push eax
push 0x40
push 0
push 0xb
push 0
push 0xb
push 0x60
push dword [esi]
call fcn.0051c880
add esp, 0x58
push 0
push 0x40
push 0
push 1
push 0x20
push ebx
call fcn.0051c640
push 0
push 3
push 0x80
push ebx
call fcn.0051cfc0
add esp, 0x28
cmp dword [esi + 0xe0], 0
je 0x508329
push ebx
call fcn.0051c410
mov edx, dword [ebp + 8]
add esp, 4
mov esi, eax
mov edx, dword [edx + 0xe0]
test edx, edx
je 0x5082d0
nop dword [eax]
mov ecx, dword [edx]
test ecx, ecx
je 0x5082c9
test esi, esi
je 0x5082c9
mov eax, dword [ecx + 8]
and eax, 0xfffffffd
mov dword [ecx + 0xc], esi
or eax, 1
mov dword [ecx + 8], eax
mov edx, dword [edx + 4]
test edx, edx
jne 0x5082b0
mov esi, dword [ebp + 8]
push dword [esi + 0x30]
push 0x8d
push 0
push 0xb
push 0x20
push ebx
call fcn.0051c640
push dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
add eax, ecx
push eax
push ecx
push 2
push dword [esp + 0x4c]
push dword [esp + 0x44]
push esi
call fcn.0050c790
push 0x22
push ebx
call fcn.0051c380
add esp, 0x3c
test eax, eax
je 0x508329
test edi, edi
je 0x508329
mov ecx, dword [eax + 8]
and ecx, 0xfffffffd
mov dword [eax + 0xc], edi
or ecx, 1
mov dword [eax + 8], ecx
test byte [esp + 0x10], 2
je 0x50840d
push ebx
call fcn.0051c410
mov edx, dword [esp + 0x50]
add esp, 4
test edx, edx
je 0x508358
test eax, eax
je 0x508358
mov ecx, dword [edx + 8]
and ecx, 0xfffffffd
mov dword [edx + 0xc], eax
or ecx, 1
mov dword [edx + 8], ecx
push 8
push 0x40
push 0
push 0xb
push 0
push 0xb
push 0x60
push dword [esi]
call fcn.0051c880
mov edi, dword [esp + 0x34]
push 0
push 1
lea eax, [edi*4 - 4]
push eax
push 0x8b
push 0x20
push ebx
call fcn.0051c640
push dword [esp + 0x48]
mov eax, dword [esp + 0x58]
add eax, edi
push eax
push edi
mov edi, dword [esp + 0x68]
push 3
push edi
push dword [esp + 0x64]
push esi
call fcn.0050c790
mov eax, dword [esp + 0x68]
add esp, 0x54
lea eax, [eax*4 - 4]
push eax
push 0x8b
push 0
push 3
push 0x20
push ebx
call fcn.0051c640
mov eax, dword [esp + 0x2c]
add eax, dword [esp + 0x34]
shl eax, 2
push eax
push 0x40
push 0
push 0xb
push 0
push 0xb
push 0x60
push dword [esi]
call fcn.0051c880
push 0
push 0x40
push 0
push 1
push 0x20
push ebx
call fcn.0051c640
add esp, 0x50
push 0
push 3
push 0x80
push ebx
call fcn.0051cfc0
add esp, 0x10
jmp 0x508411
mov edi, dword [esp + 0x24]
cmp dword [esi + 0xf0], 0
je 0x50849b
push ebx
call fcn.0051c410
mov edx, dword [ebp + 8]
add esp, 4
mov esi, eax
mov edx, dword [edx + 0xf0]
test edx, edx
je 0x508456
mov ecx, dword [edx]
test ecx, ecx
je 0x50844f
test esi, esi
je 0x50844f
mov eax, dword [ecx + 8]
and eax, 0xfffffffd
mov dword [ecx + 0xc], esi
or eax, 1
mov dword [ecx + 8], eax
mov edx, dword [edx + 4]
test edx, edx
jne 0x508436
mov esi, dword [ebp + 8]
push dword [esi + 0x30]
push 0x8d
push 0
push 0xb
push 0x20
push ebx
call fcn.0051c640
push 0
push 0xb
push 0
push 3
push 0x20
push ebx
call fcn.0051c640
push 2
push esi
call fcn.004fc250
push 0xffffffffffffffff
push 0x40
push 4
push 0x8b
push 0x20
push ebx
call fcn.0051c640
add esp, 0x50
push ebx
call fcn.0051c410
mov edx, eax
add esp, 4
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x5084d8
nop
mov ecx, dword [eax]
test ecx, ecx
je 0x5084cd
test edx, edx
je 0x5084cd
mov eax, dword [ecx + 8]
and eax, 0xfffffffd
mov dword [ecx + 0xc], edx
or eax, 1
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 4]
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x5084b0
push 0
push 3
push 0
push 0x8b
push 0x20
push ebx
call fcn.0051c640
push dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
add eax, ecx
push eax
push ecx
push 4
push edi
push dword [esp + 0x44]
push esi
call fcn.0050c790
mov eax, dword [esp + 0x48]
lea eax, [eax*4 - 4]
push eax
push 0x83
push 0
push 3
push 0x20
push ebx
call fcn.0051c640
add esp, 0x4c
push 1
push 0x40
push 0
push 1
push 0x20
push ebx
call fcn.0051c640
push 0
push 3
push 0x80
push ebx
call fcn.0051cfc0
add esp, 0x28
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret