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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x90
mov ebx, dword [ebp + 0xc]
lea edi, [esp + 0x48]
mov ecx, edi
lea esi, [ebx + 0x2b0]
mov edx, ebx
push esi
call fcn.0040ecf0
add esp, 4
movzx eax, byte [esp + 0x48]
cmp al, 4
jne 0x40f750
nop word cs:[eax + eax]
nop dword [eax]
push ebx
call fcn.0041db40
add esp, 4
add eax, 0x50
push eax
call fcn.0043fe70
add esp, 4
test al, al
je 0x40f722
push ebx
call fcn.0041db40
add esp, 4
push esi
push eax
push edi
call fcn.00424b00
add esp, 0xc
cmp dword [esp + 0x48], 0
movq xmm0, qword [esp + 0x4c]
jne 0x40f766
movd eax, xmm0
test eax, eax
jne 0x40f6e0
push ebx
call fcn.0041db40
add esp, 4
cmp byte [eax + 0x29b], 0
mov ebx, eax
je 0x40f971
lea eax, [ebx + 0x2a0]
push eax
call fcn.004436c0
add esp, 4
xor al, 1
jmp 0x40f973
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x49]
mov dword [esp + 0x24], edx
mov dword [esp + 0x21], ecx
mov byte [esp + 0x20], al
jmp 0x40f778
movd eax, xmm0
movq qword [esp + 0x20], xmm0
cmp al, 4
je 0x40f9af
movzx eax, al
lea ecx, [eax - 1]
cmp ecx, 2
jb 0x40fc4c
test eax, eax
jne 0x40f79c
push dword [esp + 0x24]
call fcn.004c9430
add esp, 4
jmp 0x40fc4c
mov ebx, dword [esp + 0x24]
cmp byte [ebx + 8], 6
jne 0x40fc4c
mov eax, dword [ebx + 4]
push dword [ebx]
call dword [eax + 0x20]
add esp, 4
cmp edx, 0xb
jbe 0x40f9c1
push 0xb
push str.CloseNotify1_v0_t
push edx
push eax
push edi
call fcn.004d8100
add esp, 0x14
cmp dword [esp + 0x48], 0
mov dword [esp + 0x44], ebx
je 0x40f9e4
mov eax, dword [esp + 0x78]
mov ebx, dword [esp + 0x6c]
mov edx, dword [esp + 0x7c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x80]
cmp ebx, 0xffffffff
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x10], eax
je 0x40fa2f
mov esi, dword [esp + 0x64]
mov ecx, esi
lea ecx, [esi + eax - 1]
mov dword [esp + 8], esi
cmp ecx, edx
jae 0x40fc4c
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x60]
lea esi, [eax - 1]
sub eax, edi
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x54]
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x58]
mov dword [esp + 0x28], eax
mov dword [esp + 0x40], edi
mov eax, esi
mov dword [esp + 0x38], esi
dec esi
neg eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 4]
xor esi, esi
mov edi, 1
movzx ecx, byte [eax + ecx]
mov eax, 1
shld esi, eax, cl
shl edi, cl
test cl, 0x20
mov eax, 0
cmovne esi, edi
cmovne edi, eax
and esi, dword [esp + 0x40]
and edi, dword [esp + 0xc]
or edi, esi
je 0x40f8fb
mov eax, dword [esp + 0x38]
mov edi, ebx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], ebx
cmp eax, ebx
mov ebx, 0
cmova edi, eax
mov eax, dword [esp + 8]
sub ecx, edi
cmovb ecx, ebx
lea esi, [eax + edi]
mov eax, dword [esp + 0x1c]
add edi, eax
nop word cs:[eax + eax]
nop dword [eax]
sub ecx, 1
jb 0x40f91e
cmp esi, edx
jae 0x40fbdf
movzx eax, byte [edi]
mov edx, dword [esp + 4]
inc edi
lea ebx, [esi + 1]
cmp al, byte [edx + esi]
mov edx, dword [esp + 0x14]
mov esi, ebx
je 0x40f8d0
add ebx, dword [esp + 0x30]
mov eax, ebx
jmp 0x40f903
mov eax, dword [esp + 8]
add eax, dword [esp + 0x10]
xor ebx, ebx
mov ecx, eax
mov ecx, dword [esp + 0x3c]
mov dword [esp + 8], eax
add ecx, eax
cmp ecx, edx
jb 0x40f866
jmp 0x40fc4c
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x18]
add ecx, eax
lea eax, [esi + 1]
cmp edi, eax
jae 0x40fc03
cmp esi, dword [esp + 0x10]
jae 0x40fbdf
mov eax, dword [esp + 8]
add eax, esi
cmp eax, edx
jae 0x40fbdf
mov eax, dword [esp + 0x1c]
movzx eax, byte [eax + esi]
cmp al, byte [ecx + esi]
lea esi, [esi - 1]
je 0x40f930
mov eax, dword [esp + 8]
mov ebx, dword [esp + 0x28]
add eax, dword [esp + 0x2c]
jmp 0x40f905
xor eax, eax
movzx edx, byte [ebx + 0x29c]
mov ecx, ebx
add ecx, 0x88
mov dword [esp + 0x48], ecx
mov byte [esp + 0x4c], al
lea eax, [esp + 0x20]
mov byte [esp + 0x4d], dl
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push edi
push eax
call fcn.0043c9b0
add esp, 0x10
movzx eax, byte [esp + 0x20]
cmp al, 4
jne 0x40f778
mov eax, dword [esp + 0x24]
mov esi, dword [ebp + 8]
mov dword [esi + 4], eax
mov byte [esi], 4
jmp 0x40fc59
jne 0x40fc4c
push 0xb
push eax
push str.CloseNotify1_v0_t
call fcn.004f60f4
add esp, 0xc
test eax, eax
jne 0x40fc4c
jmp 0x40fc07
cmp byte [esp + 0x56], 0
jne 0x40fc4c
mov ecx, dword [esp + 0x4c]
mov esi, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
movzx ebx, byte [esp + 0x54]
test ecx, ecx
je 0x40fb81
cmp edx, ecx
jbe 0x40fb7b
cmp byte [esi + ecx], 0xc0
jge 0x40fb81
mov edi, esi
push 0x50807c
push edx
push ecx
push edx
push edi
call fcn.005062e0
add esp, 0x14
ud2
mov ecx, dword [esp + 0x64]
mov dword [esp + 0xc], ecx
lea ecx, [ecx + eax - 1]
cmp ecx, edx
jae 0x40fc4c
mov eax, dword [esp + 0x10]
xor edi, edi
lea esi, [eax - 1]
mov dword [esp + 0x38], esi
mov esi, dword [esp + 0x50]
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0x58]
sub eax, esi
mov dword [esp + 0x18], esi
cmovb eax, edi
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x28], eax
lea eax, [esi - 1]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x1c]
add eax, esi
mov dword [esp + 0x30], eax
mov eax, dword [esp + 4]
dec eax
mov dword [esp + 0x2c], eax
jmp 0x40faaf
mov ecx, dword [esp + 0xc]
add ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], ecx
add ecx, eax
cmp ecx, edx
jae 0x40fc4c
mov eax, dword [esp + 4]
xor esi, esi
movzx ecx, byte [eax + ecx]
mov eax, 1
shld esi, eax, cl
shl eax, cl
test cl, 0x20
mov ecx, 0
cmovne esi, eax
cmovne eax, ecx
and esi, dword [esp + 0x3c]
and eax, dword [esp + 0x40]
or eax, esi
je 0x40fa95
mov eax, dword [esp + 0xc]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x30]
lea ebx, [esi + eax]
mov esi, dword [esp + 0x34]
mov ecx, eax
neg ecx
nop word cs:[eax + eax]
nop
sub esi, 1
jb 0x40fb29
cmp ebx, edx
jae 0x40fbdf
movzx eax, byte [edi]
mov edx, dword [esp + 4]
dec ecx
inc edi
cmp al, byte [edx + ebx]
mov edx, dword [esp + 0x14]
lea ebx, [ebx + 1]
je 0x40fb00
neg ecx
jmp 0x40fa9d
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x18]
add ecx, eax
lea esi, [eax - 1]
mov edi, ebx
sub edi, 1
jb 0x40fc03
mov eax, dword [esp + 8]
cmp eax, dword [esp + 0x10]
jae 0x40fbdf
lea eax, [esi + ebx]
cmp eax, edx
jae 0x40fbdf
mov eax, dword [esp + 0x1c]
movzx eax, byte [eax + ebx - 1]
cmp al, byte [ecx + ebx]
mov ebx, edi
je 0x40fb3c
mov ecx, dword [esp + 0xc]
add ecx, dword [esp + 0x28]
jmp 0x40fa9d
jne 0x40fa1a
cmp ecx, edx
jne 0x40fb8e
test bl, bl
jne 0x40fc03
jmp 0x40fc4c
movzx eax, byte [esi + ecx]
test al, al
jns 0x40fbff
mov dword [esp + 4], esi
movzx esi, byte [esi + ecx + 1]
mov edi, eax
and edi, 0x1f
and esi, 0x3f
cmp al, 0xe0
jb 0x40fbe3
mov dword [esp + 0x14], edx
mov edx, dword [esp + 4]
shl esi, 6
movzx edx, byte [edx + ecx + 2]
and edx, 0x3f
or edx, esi
cmp al, 0xf0
jb 0x40fbf0
mov esi, dword [esp + 4]
and edi, 7
shl edx, 6
shl edi, 0x12
movzx eax, byte [esi + ecx + 3]
and eax, 0x3f
or eax, edx
or eax, edi
jmp 0x40fbfb
ud2
shl edi, 6
or edi, esi
mov esi, dword [esp + 4]
mov eax, edi
jmp 0x40fbff
mov esi, dword [esp + 4]
shl edi, 0xc
or edx, edi
mov eax, edx
mov edx, dword [esp + 0x14]
test bl, bl
je 0x40fc45
mov ebx, dword [esp + 0x44]
mov esi, dword [ebp + 8]
mov dword [esi + 4], 0
mov byte [esi], 4
mov eax, dword [ebx + 4]
push dword [ebx]
call dword [eax]
add esp, 4
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x40fc36
push dword [eax + 8]
push ecx
push dword [ebx]
call fcn.0040dc90
add esp, 0xc
push 4
push 0xc
push ebx
call fcn.0040dc90
add esp, 0xc
jmp 0x40fc59
cmp eax, 0x110000
jne 0x40fc63
movq xmm0, qword [esp + 0x20]
mov esi, dword [ebp + 8]
movq qword [esi], xmm0
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, esi
mov esi, 1
cmp eax, 0x80
jb 0x40fc8a
mov esi, 2
cmp eax, 0x800
jb 0x40fc8a
cmp eax, 0x10000
mov esi, 4
sbb esi, 0
add ecx, esi
mov eax, edi
je 0x40fca5
cmp edx, ecx
jbe 0x40fc9f
cmp byte [eax + ecx], 0xc0
jge 0x40fca5
jmp 0x40fa1c
jne 0x40fa1c
cmp ecx, edx
je 0x40fc03
cmp byte [eax + ecx], 0
jmp 0x40fc03