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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x88
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
cmp edx, esi
jae 0x405a37
lea edi, [esp + 0x40]
push edx
push ecx
push esi
push eax
push edi
call fcn.00419ba0
add esp, 0x14
cmp dword [esp + 0x40], 0
je 0x405b67
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x74]
mov edi, dword [esp + 0x7c]
cmp ecx, 0xffffffff
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x78]
mov dword [esp + 4], eax
mov dword [esp + 0x10], ecx
je 0x405b79
mov edx, dword [esp + 0x5c]
xor eax, eax
lea ecx, [edx + edi - 1]
cmp ecx, esi
jae 0x405d9d
lea eax, [edi - 1]
mov ebx, dword [esp + 0x58]
mov dword [esp + 0x18], edi
mov dword [esp + 8], esi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], eax
mov eax, edi
sub eax, ebx
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], ebx
neg eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x38], eax
jmp 0x405a73
jne 0x405b72
push edx
push eax
push ecx
call sub.VCRUNTIME140.dll_memcmp
add esp, 0xc
test eax, eax
sete al
jmp 0x405d9d
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], 0
add edx, eax
mov esi, dword [esp + 8]
mov eax, dword [esp + 0x20]
lea ecx, [edx + eax]
cmp ecx, esi
jae 0x405b72
mov eax, dword [esp + 4]
mov esi, 1
movzx ecx, byte [eax + ecx]
xor eax, eax
shld eax, esi, cl
shl esi, cl
test cl, 0x20
mov ecx, 0
cmovne eax, esi
cmovne esi, ecx
and eax, dword [esp + 0x34]
and esi, dword [esp + 0x38]
or esi, eax
je 0x405a52
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0xc], edx
cmp ecx, eax
mov edi, eax
mov eax, dword [esp + 0x10]
cmova edi, ecx
xor ecx, ecx
lea esi, [edx + edi]
mov dword [esp + 0x30], edi
lea ebx, [eax + edi]
mov eax, dword [esp + 0x18]
sub eax, edi
cmovb eax, ecx
nop dword [eax]
sub eax, 1
jb 0x405b04
cmp esi, dword [esp + 8]
jae 0x405df0
movzx edx, byte [ebx]
mov edi, dword [esp + 4]
inc ebx
lea ecx, [esi + 1]
cmp dl, byte [edi + esi]
mov esi, ecx
je 0x405ad0
add ecx, dword [esp + 0x2c]
mov dword [esp + 0x14], 0
mov edx, ecx
jmp 0x405a60
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 8]
mov edi, dword [esp + 0x18]
cmp dword [esp + 0x14], eax
mov ecx, dword [esp + 0xc]
jae 0x405d9b
dec eax
cmp eax, edi
jae 0x405e26
add ecx, eax
cmp ecx, esi
jae 0x405e37
mov edx, dword [esp + 0x10]
mov ebx, edi
mov edi, dword [esp + 4]
movzx edx, byte [edx + eax]
cmp dl, byte [edi + ecx]
mov edi, ebx
je 0x405b10
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x24]
add edx, dword [esp + 0x28]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x20]
lea ecx, [edx + eax]
cmp ecx, esi
jb 0x405a73
jmp 0x405b72
cmp byte [esp + 0x4e], 0
je 0x405cfa
xor eax, eax
jmp 0x405d9d
mov eax, dword [esp + 0x5c]
xor ebx, ebx
lea ecx, [eax + edi - 1]
mov dword [esp + 0xc], eax
mov eax, 0
cmp ecx, esi
jae 0x405d9d
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], edi
mov dword [esp + 8], esi
add eax, edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x30], eax
mov eax, edi
sub eax, edx
cmovb eax, ebx
mov dword [esp + 0x2c], eax
mov eax, 1
sub eax, edx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
lea eax, [eax + edx - 1]
dec edx
mov dword [esp + 0x24], eax
lea eax, [edi - 1]
mov dword [esp + 0x10], edx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x3c], eax
jmp 0x405c16
mov ebx, dword [esp + 0xc]
add ebx, edi
mov eax, dword [esp + 0x34]
mov dword [esp + 0xc], ebx
lea ecx, [ebx + eax]
xor eax, eax
mov ebx, 0
cmp ecx, esi
jae 0x405d9d
mov eax, dword [esp + 4]
mov edx, 1
movzx ecx, byte [eax + ecx]
xor eax, eax
shld eax, edx, cl
shl edx, cl
test cl, 0x20
cmovne eax, edx
cmovne edx, ebx
and eax, dword [esp + 0x38]
and edx, dword [esp + 0x1c]
or edx, eax
je 0x405bf6
mov ebx, dword [esp + 0xc]
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
mov eax, ebx
add ebx, ecx
mov ecx, dword [esp + 0x2c]
neg eax
nop word cs:[eax + eax]
nop
sub ecx, 1
jb 0x405c91
cmp ebx, dword [esp + 8]
jae 0x405e0e
movzx edx, byte [esi]
mov edi, dword [esp + 4]
inc esi
dec eax
cmp dl, byte [edi + ebx]
lea ebx, [ebx + 1]
je 0x405c60
mov esi, dword [esp + 8]
mov edi, dword [esp + 0x18]
neg eax
mov ebx, eax
jmp 0x405bfc
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 8]
mov edi, dword [esp + 0x18]
add eax, ecx
mov ecx, dword [esp + 0x28]
nop dword [eax + eax]
cmp ecx, 1
je 0x405d9b
cmp dword [esp + 0x10], edi
jae 0x405e48
cmp eax, esi
jae 0x405e5b
movzx edx, byte [ebx]
mov esi, edi
mov edi, dword [esp + 4]
inc ecx
dec ebx
mov byte [esp + 0x14], dl
movzx edx, byte [esp + 0x14]
cmp dl, byte [edi + eax]
mov edi, esi
mov esi, dword [esp + 8]
lea eax, [eax - 1]
je 0x405cb0
mov ebx, dword [esp + 0xc]
add ebx, dword [esp + 0x3c]
jmp 0x405bfc
mov ecx, dword [esp + 0x44]
mov edi, dword [esp + 0x70]
mov edx, dword [esp + 0x74]
movzx ebx, byte [esp + 0x4c]
test ecx, ecx
je 0x405d35
cmp edx, ecx
jbe 0x405d33
cmp byte [edi + ecx], 0xc0
jge 0x405d35
mov dword [esp + 4], edi
push 0x4220c4
push edx
push ecx
push edx
push dword [esp + 0x14]
call fcn.00420810
add esp, 0x14
ud2
jne 0x405d19
cmp ecx, edx
jne 0x405d42
test bl, bl
jne 0x405d9b
jmp 0x405b72
mov bh, byte [edi + ecx]
mov dword [esp + 4], edi
movzx esi, bh
test bh, bh
jns 0x405d97
movzx eax, byte [edi + ecx + 1]
and esi, 0x1f
and eax, 0x3f
cmp bh, 0xe0
jb 0x405d8b
movzx edi, byte [edi + ecx + 2]
shl eax, 6
and edi, 0x3f
or edi, eax
cmp bh, 0xf0
jb 0x405d92
mov eax, dword [esp + 4]
and esi, 7
shl edi, 6
shl esi, 0x12
movzx eax, byte [eax + ecx + 3]
and eax, 0x3f
or eax, edi
jmp 0x405d8e
shl esi, 6
or esi, eax
jmp 0x405d97
shl esi, 0xc
or esi, edi
test bl, bl
je 0x405da5
mov al, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp esi, 0x110000
je 0x405b72
mov edi, 1
cmp esi, 0x80
jb 0x405dd9
mov edi, 2
cmp esi, 0x800
jb 0x405dd9
cmp esi, 0x10000
mov edi, 4
sbb edi, 0
add ecx, edi
je 0x405e00
cmp edx, ecx
jbe 0x405dfa
mov eax, dword [esp + 4]
cmp byte [eax + ecx], 0xc0
jge 0x405e00
jmp 0x405d1d
mov eax, dword [esp + 0xc]
add eax, dword [esp + 0x30]
jmp 0x405e16
jne 0x405d1d
cmp ecx, edx
je 0x405d9b
mov eax, dword [esp + 4]
cmp byte [eax + ecx], 0
jmp 0x405d9b
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0xc]
mov edi, dword [esp + 8]
cmp edi, eax
cmova eax, edi
push 0x422038
jmp 0x405e2b
push 0x422048
push edi
push eax
call fcn.004205b0
add esp, 0xc
ud2
push 0x422058
push esi
push ecx
call fcn.004205b0
add esp, 0xc
ud2
neg ecx
push 0x422048
push edi
push ecx
call fcn.004205b0
add esp, 0xc
ud2
push 0x422058
push esi
push eax
call fcn.004205b0
add esp, 0xc
ud2