Function at 0x46fa50
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d3942
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x24c4
call fcn.004bfc70
mov eax, dword [0x4ea93c]
xor eax, esp
mov dword [esp + 0x24c0], eax
push ebx
push esi
push edi
mov eax, dword [0x4ea93c]
xor eax, esp
push eax
lea eax, [esp + 0x24d8]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x13]
push ecx
mov esi, ebx
mov dword [esp + 0x64], eax
call fcn.0046cfa0
cmp eax, 3
jne 0x47071c
mov edx, dword [ebx]
mov eax, dword [edx + 0xc]
mov ecx, ebx
mov dword [esp + 0x94], ebx
call eax
mov esi, eax
mov edi, edx
mov dword [esp + 0x9c], esi
mov dword [esp + 0xa0], edi
mov dword [esp + 0x24e0], 0
push 0x4d6a78
mov ecx, ebx
call fcn.00412dd0
test eax, eax
je 0x46fdb0
cmp byte [ebx + 0xa9cc], 0
jne 0x46fdb0
push 0
lea ecx, [esp + 0xa8]
call fcn.004668c0
mov byte [esp + 0x24e0], 1
mov eax, dword [ebx + 0x92b4]
mov ecx, dword [ebx + 0x92b0]
push eax
push ecx
lea ecx, [esp + 0xac]
call fcn.00466610
push 8
lea edx, [esp + 0xc8]
push edx
lea ecx, [esp + 0xac]
call fcn.00466810
lea ecx, [esp + 0xa4]
call fcn.004666a0
lea ecx, [esp + 0xa4]
mov dword [esp + 0x40], eax
call fcn.004666e0
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edx
mov byte [esp + 0x13], 1
mov byte [esp + 0x24e0], 0
lea ecx, [esp + 0xa4]
call fcn.004104a0
push 0x26a
call fcn.004744a0
push eax
call fcn.0049eb10
mov eax, dword [ebx + 0xa9ac]
mov edi, dword [ebx + 0xa9a8]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], eax
movzx eax, byte [esp + 0x17]
add esp, 4
neg eax
sbb eax, eax
and eax, 0x1c
add eax, 0x1a
cmp byte [ebx + 0xa9c4], 0
mov dword [0x560cd4], 0xffffffff
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], 0
je 0x46fbe6
mov ecx, eax
not ecx
inc ecx
and ecx, 0xf
lea eax, [eax + ecx + 8]
cdq
add eax, dword [esp + 0x24]
adc edx, dword [esp + 0x28]
xor ecx, ecx
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], edx
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], ecx
mov byte [esp + 0x24e0], 2
mov dword [esp + 0x84], ecx
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], ecx
mov byte [esp + 0x24e0], 3
mov ecx, dword [esp + 0x18]
push ecx
push edi
push edx
push eax
lea edx, [esp + 0x84]
push edx
lea ecx, [esp + 0x98]
mov esi, ebx
call fcn.0046e940
mov eax, dword [esp + 0x40]
xor esi, esi
shl eax, 9
push eax
lea ecx, [esp + 0x68]
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], esi
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], esi
call fcn.0040b8e0
mov byte [esp + 0x24e0], 4
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
push ecx
push esi
push edx
call fcn.004c05a0
mov eax, dword [ebx]
mov edx, dword [eax + 8]
add esp, 0xc
push esi
push esi
push esi
mov ecx, ebx
call edx
cmp dword [esp + 0x18], esi
mov dword [esp + 0x34], esi
jl 0x4701a9
jg 0x46fcb8
test edi, edi
jbe 0x4701a9
call fcn.0047eeb0
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
mov eax, edx
sub eax, edi
push esi
mov ecx, esi
sbb ecx, dword [esp + 0x1c]
push edx
push ecx
push eax
call fcn.0047d9f0
cdq
sub eax, edx
mov esi, eax
mov eax, dword [ebx + 0x5204]
sar esi, 1
add esi, 0x32
cmp byte [eax + 0x6140], 0
jne 0x46fd0c
cmp esi, dword [0x560cd4]
je 0x46fd0c
push 0
push 0x64
mov eax, esi
cdq
push edx
push eax
push 0x4da330
call fcn.00409f30
mov eax, dword [esp + 0x78]
mov dword [0x560cd4], esi
cmp dword [esp + 0x34], eax
jae 0x46fd70
mov edx, dword [ebx]
mov eax, dword [edx + 0xc]
mov ecx, ebx
call eax
mov ecx, dword [esp + 0x74]
mov esi, dword [esp + 0x34]
cmp edx, dword [ecx + esi*8 + 4]
jl 0x46fd70
jg 0x46fd3e
mov edx, ecx
mov ecx, esi
cmp eax, dword [edx + ecx*8]
jb 0x46fd70
mov edx, dword [esp + 0x84]
mov esi, dword [esp + 0x34]
mov eax, dword [edx + esi*4]
cdq
push 1
push edx
push eax
mov eax, dword [ebx]
mov eax, dword [eax + 8]
mov ecx, ebx
call eax
mov ecx, dword [esp + 0x84]
mov eax, dword [ecx + esi*4]
cdq
sub edi, eax
sbb dword [esp + 0x18], edx
inc esi
mov dword [esp + 0x34], esi
cmp dword [esp + 0x18], 0
jg 0x47013b
jl 0x46fd89
cmp edi, 0x200
jae 0x47013b
mov edx, 0x200
sub edx, edi
push edx
lea eax, [esp + edi + 0xd0]
push 0
push eax
mov esi, edi
call fcn.004c05a0
add esp, 0xc
xor edi, edi
mov dword [esp + 0x18], edi
jmp 0x47014b
mov ecx, dword [ebx + 0xa9c8]
mov eax, dword [ebx]
mov edx, dword [eax + 8]
push 0
push 0
push ecx
mov ecx, ebx
call edx
push 0x78
mov ecx, ebx
call fcn.00412d70
test eax, eax
je 0x46fe01
cmp byte [ebx + 0xa9cc], 0
jne 0x46fe01
movzx eax, word [ebx + 0xa5c6]
mov ecx, dword [ebx + 0xa5c8]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], 0
mov byte [esp + 0x13], 0
jmp 0x46fb85
cmp byte [esp + 0x13], 0
je 0x46fe66
cmp byte [ebx + 0xa9c4], 0
je 0x46fe66
push 0x26b
call fcn.004744a0
push eax
call fcn.0049eb10
add esp, 4
push 0x274
call fcn.004744a0
push eax
lea edx, [ebx + 0x1e]
push edx
call fcn.004abfe0
add esp, 8
push 0xa
mov ecx, 0x51e7a8
call fcn.00433290
mov dword [esp + 0x24e0], 0xffffffff
mov eax, dword [ebx]
mov edx, dword [eax + 8]
push 0
push edi
push esi
mov ecx, ebx
call edx
xor eax, eax
jmp 0x47071c
mov edx, dword [ebx]
xor eax, eax
push eax
push eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [ebx + 0xa9a8], eax
mov dword [ebx + 0xa9ac], eax
push eax
mov eax, dword [edx + 8]
mov ecx, ebx
call eax
mov edx, dword [ebx]
mov edx, dword [edx + 4]
push 0x2000
lea eax, [esp + 0x4d0]
push eax
mov ecx, ebx
call edx
test eax, eax
je 0x4700e8
add eax, 0xffffffce
mov dword [esp + 0x20], 0
mov dword [esp + 0x54], eax
test eax, eax
jle 0x470097
mov edx, 0x20
lea edi, [esp + 0x4ce]
sub edx, str.Protect
mov dword [esp + 0x2c], edi
mov dword [esp + 0x38], edx
jmp 0x46fee4
mov edx, dword [esp + 0x38]
cmp byte [edi], 0x7a
lea esi, [edi - 2]
jne 0x46ffcc
mov ecx, 8
mov eax, str.Protect
add edx, edi
lea esp, [esp]
mov edi, dword [edx + eax]
cmp edi, dword [eax]
jne 0x46ffcc
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x46ff00
movzx ax, byte [esi + 1]
movzx dx, byte [esi]
mov ecx, 0x100
imul ax, cx
add ax, dx
not ax
movzx edi, ax
push 0x34
lea eax, [esi + 2]
push eax
push 0xffffffffffffffff
call fcn.004279c0
cmp di, ax
jne 0x47001f
movzx eax, byte [esi + 0x2d]
movzx ecx, byte [esi + 0x2c]
movzx edx, byte [esi + 0x2b]
shl eax, 8
add eax, ecx
movzx ecx, byte [esi + 0x2a]
movzx edi, byte [esi + 0x31]
shl eax, 8
add eax, edx
movzx edx, byte [esi + 0x34]
shl eax, 8
add eax, ecx
movzx ecx, byte [esi + 0x33]
mov dword [esp + 0x40], eax
movzx eax, byte [esi + 0x35]
shl eax, 8
add eax, edx
movzx edx, byte [esi + 0x32]
shl eax, 8
add eax, ecx
shl eax, 8
add eax, edx
movzx edx, byte [esi + 0x30]
shl edi, 8
add edi, edx
movzx edx, byte [esi + 0x2f]
shl edi, 8
add edi, edx
movzx edx, byte [esi + 0x2e]
push 1
xor esi, esi
push esi
xor ecx, ecx
push ecx
shl edi, 8
push eax
add edi, edx
call fcn.004bfed0
add edi, eax
adc esi, edx
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], esi
mov byte [esp + 0x13], 1
jmp 0x47007e
cmp byte [esi + 2], 0x78
jne 0x47001f
mov eax, str.Protect_
mov edx, esi
sub edx, eax
mov ecx, 8
lea edi, [edx + 0x12]
mov edx, dword [eax + edi]
cmp edx, dword [eax]
jne 0x47001f
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x46ffe3
movzx edi, byte [esi + 1]
movzx eax, byte [esi]
shl edi, 8
add edi, eax
push 0x18
lea eax, [esi + 2]
push eax
not edi
push 0xffffffffffffffff
and edi, 0xffff
call fcn.004279c0
and eax, 0xffff
cmp edi, eax
je 0x47003d
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x2c]
inc eax
inc edi
cmp eax, dword [esp + 0x54]
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], edi
jl 0x46fee0
jmp 0x470097
movzx eax, byte [esi + 0xd]
movzx ecx, byte [esi + 0xc]
movzx edx, byte [esi + 0x10]
shl eax, 8
add eax, ecx
movzx ecx, byte [esi + 0xf]
mov dword [esp + 0x40], eax
movzx eax, byte [esi + 0x11]
shl eax, 8
add eax, edx
movzx edx, byte [esi + 0xe]
shl eax, 8
add eax, ecx
shl eax, 8
add eax, edx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], 0
mov byte [esp + 0x13], 0
mov eax, dword [esp + 0x20]
cdq
add eax, dword [esp + 0x24]
adc edx, dword [esp + 0x28]
mov dword [ebx + 0xa9a8], eax
mov dword [ebx + 0xa9ac], edx
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [ebx]
add eax, 0x1fce
adc ecx, 0
push 0
push ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
push eax
mov eax, dword [edx + 8]
mov ecx, ebx
call eax
mov edx, dword [ebx]
mov edx, dword [edx + 4]
push 0x2000
lea eax, [esp + 0x4d0]
push eax
mov ecx, ebx
call edx
test eax, eax
jne 0x46fea6
mov edi, dword [esp + 0xa0]
mov esi, dword [esp + 0x9c]
mov eax, dword [ebx + 0xa9a8]
or eax, dword [ebx + 0xa9ac]
jne 0x46fb85
mov edx, dword [ebx]
push eax
push eax
push eax
mov eax, dword [edx + 8]
mov ecx, ebx
call eax
push 0x26b
call fcn.004744a0
push eax
call fcn.0049eb10
add esp, 4
mov dword [esp + 0x24e0], 0xffffffff
mov edx, dword [ebx]
mov eax, dword [edx + 8]
push 0
push edi
push esi
mov ecx, ebx
call eax
mov eax, 1
jmp 0x47071c
add edi, 0xfffffe00
adc dword [esp + 0x18], 0xffffffff
mov esi, 0x200
mov edx, dword [ebx]
mov edx, dword [edx + 4]
push esi
lea eax, [esp + 0xd0]
push eax
mov ecx, ebx
call edx
mov eax, dword [esp + 0x30]
shl eax, 9
add eax, dword [esp + 0x64]
lea esi, [esp + 0xcc]
sub esi, eax
mov ecx, 0x200
mov dl, byte [esi + eax]
xor byte [eax], dl
inc eax
sub ecx, 1
jne 0x470176
mov eax, dword [esp + 0x30]
inc eax
mov dword [esp + 0x30], eax
cmp eax, dword [esp + 0x40]
jb 0x470194
mov dword [esp + 0x30], ecx
cmp dword [esp + 0x18], 0
jg 0x46fcb8
jl 0x4701a9
test edi, edi
ja 0x46fcb8
xor edi, edi
push edi
push 0x64
push edi
push 0x64
call fcn.0047d9f0
cdq
sub eax, edx
mov esi, eax
mov eax, dword [ebx + 0x5204]
sar esi, 1
add esi, 0x32
cmp byte [eax + 0x6140], 0
jne 0x4701e9
cmp esi, dword [0x560cd4]
je 0x4701e9
push edi
push 0x64
mov eax, esi
cdq
push edx
push eax
push 0x4da330
call fcn.00409f30
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
push edi
push edi
push 2
push eax
mov dword [0x560cd4], esi
mov esi, dword [ebx]
push ecx
call fcn.004bfed0
add eax, dword [esp + 0x58]
mov ecx, ebx
adc edx, dword [esp + 0x5c]
push edx
mov edx, dword [esi + 8]
push eax
call edx
mov eax, dword [esp + 0x40]
cmp eax, edi
jbe 0x47026c
mov edi, dword [esp + 0x64]
lea esi, [esp + 0xcc]
sub esi, edi
mov dword [esp + 0x2c], eax
mov edi, edi
mov eax, dword [ebx]
mov edx, dword [eax + 4]
push 0x200
lea ecx, [esp + 0xd0]
push ecx
mov ecx, ebx
call edx
mov eax, edi
mov edi, 0x200
lea ecx, [ecx]
mov cl, byte [esi + eax]
xor byte [eax], cl
inc eax
sub edi, 1
jne 0x470250
sub esi, 0x200
sub dword [esp + 0x2c], 1
mov edi, eax
jne 0x470230
xor edi, edi
mov edx, dword [ebx]
mov eax, dword [edx + 8]
push edi
push edi
push edi
mov ecx, ebx
call eax
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
cmp eax, edi
mov dword [esp + 0xc4], ecx
mov dword [esp + 0xc8], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
jl 0x47066e
jg 0x4702cb
cmp dword [esp + 0x24], 0
jbe 0x47066e
mov dword [esp + 0x50], 0
call fcn.0047eeb0
mov esi, dword [esp + 0x34]
cmp esi, dword [esp + 0x78]
jae 0x470329
mov edx, dword [ebx]
mov eax, dword [edx + 0xc]
mov ecx, ebx
call eax
mov ecx, dword [esp + 0x74]
cmp edx, dword [ecx + esi*8 + 4]
jl 0x470329
jg 0x4702fc
cmp eax, dword [ecx + esi*8]
jb 0x470329
mov edi, dword [esp + 0x84]
mov eax, dword [edi + esi*4]
cdq
push 1
push edx
push eax
mov eax, dword [ebx]
mov edx, dword [eax + 8]
mov ecx, ebx
call edx
mov eax, dword [edi + esi*4]
mov ecx, dword [esp + 0x14]
cdq
sub ecx, eax
sbb dword [esp + 0x18], edx
inc esi
mov dword [esp + 0x34], esi
jmp 0x47032d
mov ecx, dword [esp + 0x14]
xor edi, edi
cmp dword [esp + 0x18], edi
jg 0x470364
jl 0x47033f
cmp ecx, 0x200
jae 0x470364
mov eax, 0x200
sub eax, ecx
push eax
mov esi, ecx
lea ecx, [esp + ecx + 0xd0]
push edi
push ecx
call fcn.004c05a0
add esp, 0xc
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
jmp 0x470378
add ecx, 0xfffffe00
adc dword [esp + 0x18], 0xffffffff
mov esi, 0x200
mov dword [esp + 0x14], ecx
mov edx, dword [ebx]
mov edx, dword [edx + 4]
push esi
lea eax, [esp + 0xd0]
push eax
mov ecx, ebx
call edx
mov ecx, dword [esp + 0x60]
push eax
mov dword [esp + 0x3c], eax
lea eax, [esp + 0xd0]
push eax
call fcn.0043b0c0
push 0x200
lea ecx, [esp + 0xd0]
push ecx
push 0xffffffffffffffff
call fcn.004279c0
mov edx, dword [ebx]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, ebx
and esi, 0xffff
mov dword [esp + 0xa4], ebx
call eax
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], edx
mov byte [esp + 0x24e0], 5
mov eax, dword [esp + 0xc8]
mov ecx, dword [esp + 0xc4]
mov edx, dword [ebx]
mov edx, dword [edx + 8]
push 0
push eax
push ecx
mov ecx, ebx
call edx
mov ecx, ebx
call fcn.0043b320
mov ecx, ebx
movzx edi, al
call fcn.0043b320
movzx eax, al
shl eax, 8
add edi, eax
add dword [esp + 0xc4], 2
mov dword [esp + 0x44], edi
adc dword [esp + 0xc8], 0
mov byte [esp + 0x24e0], 4
mov eax, dword [esp + 0xb0]
mov ecx, dword [esp + 0xac]
mov edx, dword [ebx]
mov edx, dword [edx + 8]
push 0
push eax
push ecx
mov ecx, ebx
call edx
cmp edi, esi
jne 0x470499
mov eax, dword [esp + 0x3c]
cmp eax, 0xffffffff
je 0x47048c
mov ecx, dword [esp + 0x50]
push ecx
mov edx, eax
shl edx, 9
push edx
push eax
push 0x26c
call fcn.004744a0
push eax
call fcn.0049eb10
add esp, 0x10
push 0x26e
call fcn.004744a0
push eax
call fcn.0049eb10
add esp, 4
mov dword [esp + 0x3c], 0xffffffff
jmp 0x4705f5
mov eax, dword [esp + 0x30]
shl eax, 9
add eax, dword [esp + 0x64]
mov ecx, 0x80
lea esi, [esp + 0xcc]
lea edi, [esp + 0x2cc]
rep movsd dword es:[edi], dword [esi]
mov edi, eax
lea eax, [esp + 0xcc]
xor esi, esi
sub edi, eax
mov dword [esp + 0x54], edi
lea ebx, [ebx]
lea eax, [esp + esi + 0xcc]
mov cl, byte [edi + eax]
xor byte [eax], cl
inc esi
cmp esi, 0x200
jb 0x4704d0
push 0x200
lea edx, [esp + 0xd0]
push edx
push 0xffffffffffffffff
call fcn.004279c0
and eax, 0xffff
cmp dword [esp + 0x44], eax
je 0x470742
mov dword [esp + 0x5c], 0x40
mov ecx, 0x80
lea esi, [esp + 0x2cc]
lea edi, [esp + 0xcc]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x5c]
xor esi, esi
test edi, edi
jle 0x470544
mov ecx, dword [esp + 0x54]
lea eax, [esp + esi + 0xcc]
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc esi
cmp esi, edi
jl 0x470533
push 0x200
lea eax, [esp + 0xd0]
push eax
push 0xffffffffffffffff
call fcn.004279c0
and eax, 0xffff
cmp dword [esp + 0x44], eax
je 0x470742
mov eax, dword [esp + 0x5c]
mov ecx, 0x80
lea esi, [esp + 0x2cc]
lea edi, [esp + 0xcc]
rep movsd dword es:[edi], dword [esi]
cmp eax, 0x200
jae 0x4705a9
mov esi, dword [esp + 0x54]
jmp 0x470590
lea ecx, [esi + eax]
mov dl, byte [esp + ecx + 0xcc]
xor byte [esp + eax + 0xcc], dl
inc eax
cmp eax, 0x200
jb 0x470590
push 0x200
lea eax, [esp + 0xd0]
push eax
push 0xffffffffffffffff
call fcn.004279c0
and eax, 0xffff
cmp dword [esp + 0x44], eax
je 0x470742
mov eax, dword [esp + 0x5c]
add eax, 0x40
cmp eax, 0x100
mov dword [esp + 0x5c], eax
jl 0x470510
inc dword [esp + 0x2c]
cmp dword [esp + 0x3c], 0xffffffff
jne 0x4705f5
mov edx, dword [esp + 0x20]
mov dword [esp + 0x3c], edx
mov eax, dword [esp + 0x30]
inc dword [esp + 0x20]
add dword [esp + 0x50], 0x200
inc eax
mov dword [esp + 0x30], eax
cmp eax, dword [esp + 0x40]
jb 0x470618
mov dword [esp + 0x30], 0
cmp dword [esp + 0x18], 0
jg 0x4702d3
jl 0x470630
cmp dword [esp + 0x14], 0
ja 0x4702d3
mov ecx, dword [esp + 0x3c]
cmp ecx, 0xffffffff
je 0x47066e
mov eax, dword [esp + 0x20]
shl eax, 9
push eax
mov eax, ecx
shl eax, 9
push eax
push ecx
push 0x26c
call fcn.004744a0
push eax
call fcn.0049eb10
add esp, 0x10
push 0x26e
call fcn.004744a0
push eax
call fcn.0049eb10
add esp, 4
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [ebx]
mov edx, dword [edx + 8]
push 0
push eax
push ecx
mov ecx, ebx
call edx
mov eax, dword [esp + 0x60]
push 0x7fffffff
push 0x7fffffff
push eax
mov ecx, ebx
call fcn.0043b910
mov eax, dword [esp + 0x2c]
neg eax
sbb eax, eax
and eax, 2
mov esi, eax
mov byte [esp + 0x24e0], 3
mov eax, dword [esp + 0x64]
test eax, eax
je 0x4706bf
push eax
call fcn.004bff04
add esp, 4
mov byte [esp + 0x24e0], 2
mov eax, dword [esp + 0x84]
test eax, eax
je 0x4706db
push eax
call fcn.004bff04
add esp, 4
mov byte [esp + 0x24e0], 0
mov eax, dword [esp + 0x74]
test eax, eax
je 0x4706f4
push eax
call fcn.004bff04
add esp, 4
mov dword [esp + 0x24e0], 0xffffffff
mov eax, dword [esp + 0xa0]
mov ecx, dword [esp + 0x9c]
mov edx, dword [ebx]
mov edx, dword [edx + 8]
push 0
push eax
push ecx
mov ecx, ebx
call edx
mov eax, esi
mov ecx, dword [esp + 0x24d8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x24c0]
xor ecx, esp
call fcn.004bfc52
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x50]
cmp eax, 0xffffffff
je 0x47077d
push esi
mov ecx, eax
shl ecx, 9
push ecx
push eax
push 0x26c
call fcn.004744a0
push eax
call fcn.0049eb10
add esp, 0x10
push 0x26e
call fcn.004744a0
push eax
call fcn.0049eb10
add esp, 4
mov eax, dword [esp + 0x20]
cmp eax, 0xffffffff
je 0x4707b5
lea edx, [esi + 0x200]
push edx
push esi
push eax
push 0x26c
call fcn.004744a0
push eax
call fcn.0049eb10
add esp, 0x10
push 0x26d
call fcn.004744a0
push eax
call fcn.0049eb10
add esp, 4
mov esi, dword [esp + 0x60]
mov edi, dword [esi]
mov eax, dword [edi + 0xc]
push 0
mov ecx, esi
mov dword [esp + 0x40], 0xffffffff
call eax
xor ecx, ecx
sub eax, dword [esp + 0x3c]
sbb edx, ecx
push edx
mov edx, dword [edi + 8]
push eax
mov ecx, esi
call edx
mov eax, dword [esp + 0x38]
push eax
lea ecx, [esp + 0xd0]
push ecx
mov ecx, esi
call fcn.0043b0c0
jmp 0x4705f5