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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xa8
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x58], ecx
lea ecx, [esp + 0x60]
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 1
mov dword [esp + 0x28], 0
mov dword [esp + 0x48], edx
push esi
push eax
push dword [ebp + 8]
call fcn.00417450
add esp, 0xc
mov edi, dword [esp + 0x9c]
mov ebx, dword [esp + 0x70]
mov edx, dword [esp + 0x90]
mov esi, dword [esp + 0x94]
mov ecx, dword [esp + 0x6c]
cmp ebx, edi
mov eax, edi
mov dword [esp + 0x18], edx
mov dword [esp + 0xc], esi
cmova eax, ebx
test byte [esp + 0x60], 1
mov dword [esp + 0x50], eax
je 0x4055eb
mov eax, dword [esp + 0x68]
mov dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x7c]
mov dword [esp + 0x30], edi
mov dword [esp + 0x14], 1
mov dword [esp + 8], 0
mov dword [esp + 0x38], ecx
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x1c], eax
mov eax, edi
sub eax, dword [esp + 0x40]
mov dword [esp + 0x5c], eax
mov eax, 1
sub eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 0x34], eax
lea eax, [edi - 1]
xor edi, edi
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x2c]
dec eax
mov dword [esp + 0x4c], eax
lea eax, [edx - 1]
mov dword [esp + 0x54], eax
nop word [eax + eax]
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0x1c], 0xffffffff
mov dword [esp], ebx
mov dword [esp + 0x10], edi
lea eax, [ebx + eax]
je 0x405350
cmp eax, esi
jb 0x405244
jmp 0x4057f8
mov eax, dword [esp]
mov edx, edi
mov dword [esp + 0x1c], 0
add eax, dword [esp + 0x30]
mov edi, eax
mov eax, dword [esp + 0x3c]
mov dword [esp], edi
add eax, edi
cmp eax, esi
jae 0x4057e6
movzx ecx, byte [edx + eax]
mov ebx, 1
xor eax, eax
mov edi, 1
shld eax, edi, cl
shl ebx, cl
test cl, 0x20
mov ecx, 0
mov edi, edx
cmovne eax, ebx
cmovne ebx, ecx
and eax, dword [esp + 0x38]
and ebx, dword [esp + 0x44]
or ebx, eax
je 0x405220
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp]
cmp eax, esi
cmova esi, eax
lea eax, [edi + edx]
mov edi, edx
cmp esi, ecx
cmova ecx, esi
nop word cs:[eax + eax]
nop dword [eax]
cmp ecx, esi
je 0x4052e0
mov edx, esi
add esi, edi
cmp esi, dword [esp + 0xc]
jae 0x405876
mov ebx, dword [esp + 0x34]
lea esi, [edx + 1]
movzx ebx, byte [ebx + edx]
cmp bl, byte [eax + edx]
je 0x4052a0
sub edi, dword [esp + 0x2c]
mov esi, dword [esp + 0xc]
mov dword [esp + 0x1c], 0
lea edi, [edi + edx + 1]
mov edx, dword [esp + 0x18]
jmp 0x405233
mov ecx, dword [esp + 0x4c]
mov esi, dword [esp + 0xc]
mov edi, dword [esp + 0x30]
nop dword [eax]
lea edx, [ecx + 1]
cmp dword [esp + 0x1c], edx
jae 0x405340
cmp ecx, edi
jae 0x405876
mov edx, dword [esp]
add edx, ecx
cmp edx, esi
jae 0x405876
mov edx, dword [esp + 0x34]
movzx edx, byte [edx + ecx]
cmp dl, byte [eax + ecx]
lea ecx, [ecx - 1]
je 0x4052f0
mov edi, dword [esp]
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x18]
add edi, dword [esp + 0x40]
mov dword [esp + 0x1c], eax
jmp 0x405233
mov dword [esp + 0x1c], 0
jmp 0x405526
cmp eax, esi
jae 0x4057f8
mov ecx, dword [esp + 0x4c]
cmp ecx, dword [esp + 0x30]
jb 0x40543e
movzx ecx, byte [edx + eax]
mov ebx, 1
xor eax, eax
mov esi, 1
shld eax, esi, cl
shl ebx, cl
test cl, 0x20
mov ecx, 0
mov esi, edx
cmovne eax, ebx
cmovne ebx, ecx
and eax, dword [esp + 0x38]
and ebx, dword [esp + 0x44]
or ebx, eax
je 0x4053f0
mov eax, dword [esp]
mov edx, dword [esp + 0x2c]
lea ecx, [esi + eax]
mov esi, dword [esp + 0xc]
nop word cs:[eax + eax]
nop
cmp dword [esp + 0x50], edx
je 0x405506
mov eax, edx
mov edx, dword [esp]
add edx, eax
cmp edx, esi
jae 0x405876
mov ebx, dword [esp + 0x34]
lea edx, [eax + 1]
movzx ebx, byte [ebx + eax]
cmp bl, byte [ecx + eax]
je 0x4053b0
mov ecx, dword [esp]
mov edx, dword [esp + 0x18]
add ecx, dword [esp + 4]
add ecx, eax
jmp 0x4053fd
mov ecx, dword [esp]
mov edx, esi
mov esi, dword [esp + 0xc]
add ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x3c]
mov dword [esp], ecx
add eax, ecx
cmp eax, esi
jb 0x405366
jmp 0x4057f8
mov ecx, dword [esp]
mov edx, esi
add ecx, dword [esp + 0x30]
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 0x3c]
mov dword [esp], ecx
add eax, ecx
cmp eax, esi
jae 0x4057f8
movzx ecx, byte [edx + eax]
mov ebx, 1
xor eax, eax
mov esi, 1
shld eax, esi, cl
shl ebx, cl
test cl, 0x20
mov ecx, 0
mov esi, edx
cmovne eax, ebx
cmovne ebx, ecx
and eax, dword [esp + 0x38]
and ebx, dword [esp + 0x44]
or ebx, eax
je 0x405420
mov eax, dword [esp]
mov edx, dword [esp + 0x2c]
lea ecx, [esi + eax]
mov esi, dword [esp + 0xc]
nop dword [eax]
cmp dword [esp + 0x50], edx
je 0x4054c0
mov eax, edx
mov edx, dword [esp]
add edx, eax
cmp edx, esi
jae 0x405876
mov ebx, dword [esp + 0x34]
lea edx, [eax + 1]
movzx ebx, byte [ebx + eax]
cmp bl, byte [ecx + eax]
je 0x405480
mov ecx, dword [esp]
mov edx, dword [esp + 0x18]
add ecx, dword [esp + 4]
add ecx, eax
jmp 0x40542d
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp]
mov eax, dword [esp + 0x54]
add eax, ecx
dec ecx
mov edx, esi
sub edx, 1
jb 0x40551e
lea edi, [ecx + esi]
cmp edi, dword [esp + 0xc]
jae 0x405876
mov edi, dword [esp + 0x34]
movzx ebx, byte [edi + esi - 1]
mov edi, dword [esp + 0x10]
cmp bl, byte [eax + esi]
mov esi, edx
je 0x4054d0
mov ecx, dword [esp]
mov edx, dword [esp + 0x18]
add ecx, dword [esp + 0x40]
jmp 0x405429
cmp dword [esp + 0x2c], 0
mov edx, dword [esp + 8]
mov dword [esp + 0x1c], 0xffffffff
je 0x40552a
jmp 0x405876
mov dword [esp + 0x1c], 0xffffffff
mov edx, dword [esp + 8]
mov edi, dword [esp]
mov esi, dword [esp + 0x20]
sub edi, dword [esp + 0x10]
mov eax, esi
sub eax, edx
cmp eax, edi
jb 0x4055a1
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
add ecx, dword [esp + 0x48]
add eax, edx
push edi
push ecx
push eax
mov ebx, edx
call sub.VCRUNTIME140.dll_memcpy
mov edx, ebx
add esp, 0xc
add edx, edi
sub esi, edx
mov dword [esp + 0x28], edx
cmp esi, dword [ebp + 0x18]
jb 0x4055c7
mov eax, dword [esp + 0x30]
mov ebx, dword [esp]
mov esi, dword [ebp + 0x18]
add ebx, eax
mov eax, dword [esp + 0x14]
add eax, edx
push esi
push dword [ebp + 0x14]
push eax
mov edi, edx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add edi, esi
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0xc]
mov dword [esp + 8], edi
mov dword [esp + 0x28], edi
mov edi, ebx
jmp 0x4051f0
lea ecx, [esp + 0x20]
push 1
push 1
push edi
call fcn.004e6420
add esp, 0xc
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
mov dword [esp + 0x14], eax
jmp 0x40553d
lea ecx, [esp + 0x20]
push 1
push 1
push dword [ebp + 0x18]
call fcn.004e6420
add esp, 0xc
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x14], eax
jmp 0x405567
xor edi, edi
test ecx, 0x10000
mov ebx, 0
mov dword [esp + 4], 1
jne 0x405806
mov edi, dword [esp + 0x64]
and cl, 1
mov dword [esp + 0x10], 0
mov dword [esp + 4], 1
mov dword [esp + 8], 0
test edi, edi
jne 0x405638
jmp 0x405656
add edi, ecx
mov ecx, ebx
test edi, edi
je 0x405656
cmp edi, esi
jae 0x405650
cmp byte [edx + edi], 0xbf
jg 0x405656
jmp 0x405876
jne 0x405876
mov ebx, ecx
xor bl, 1
cmp edi, esi
je 0x405703
movzx eax, byte [edx + edi]
test al, al
jns 0x4056cc
movzx esi, byte [edx + edi + 1]
mov dword [esp + 0x38], ecx
mov ecx, eax
and ecx, 0x1f
and esi, 0x3f
cmp al, 0xdf
jbe 0x4056b0
movzx edx, byte [edx + edi + 2]
shl esi, 6
and edx, 0x3f
or edx, esi
cmp al, 0xf0
jb 0x4056b9
mov esi, dword [esp + 0x18]
and ecx, 7
shl edx, 6
shl ecx, 0x12
movzx eax, byte [esi + edi + 3]
and eax, 0x3f
or eax, edx
mov edx, esi
or eax, ecx
jmp 0x4056c4
shl ecx, 6
or ecx, esi
mov eax, ecx
jmp 0x4056c4
shl ecx, 0xc
or edx, ecx
mov eax, edx
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0xc]
mov ecx, dword [esp + 0x38]
test cl, 1
jne 0x40570e
mov ecx, 1
cmp eax, 0x80
jb 0x405630
mov ecx, 2
cmp eax, 0x800
jb 0x405630
cmp eax, 0x10000
mov ecx, 4
sbb ecx, 0
jmp 0x405630
test cl, 1
mov edi, esi
je 0x4057ee
mov ecx, dword [esp + 0x20]
mov esi, edi
mov edx, dword [esp + 8]
sub esi, dword [esp + 0x10]
mov eax, ecx
sub eax, edx
cmp eax, esi
jb 0x4057a0
mov eax, dword [esp + 4]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
add eax, edx
add ecx, dword [esp + 0x48]
push esi
push ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
mov edx, dword [esp + 0x14]
add esp, 0xc
mov eax, dword [esp + 0x34]
add edx, esi
mov dword [esp + 0x28], edx
sub eax, edx
cmp eax, dword [ebp + 0x18]
jb 0x4057c6
mov eax, dword [esp + 4]
mov ecx, dword [ebp + 0x18]
mov dword [esp + 4], eax
add eax, edx
push ecx
push dword [ebp + 0x14]
push eax
mov esi, edx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add esi, dword [ebp + 0x18]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x10], edi
mov ecx, ebx
mov dword [esp + 8], esi
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0xc]
test edi, edi
jne 0x405638
jmp 0x405656
lea ecx, [esp + 0x20]
push 1
push 1
push esi
call fcn.004e6420
add esp, 0xc
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x24]
jmp 0x40572c
lea ecx, [esp + 0x20]
push 1
push 1
push dword [ebp + 0x18]
call fcn.004e6420
add esp, 0xc
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
jmp 0x405762
mov eax, dword [esp + 0x14]
mov dword [esp + 4], eax
mov edi, dword [esp + 8]
mov ebx, dword [esp + 0x10]
jmp 0x405806
mov eax, dword [esp + 0x14]
mov ebx, edi
mov edi, dword [esp + 8]
mov dword [esp + 4], eax
mov ecx, dword [ebp + 8]
mov eax, dword [esp + 0x20]
mov edx, edi
mov dword [esp + 0x10], ebx
sub ecx, ebx
sub eax, edi
mov esi, ecx
cmp eax, ecx
jb 0x405857
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 4]
add eax, dword [esp + 0x10]
add ecx, edx
push esi
push eax
push ecx
mov edi, edx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add edi, esi
mov eax, dword [esp + 0x58]
mov dword [esp + 0x28], edi
movsd xmm0, qword [esp + 0x20]
mov dword [eax + 8], edi
movsd qword [eax], xmm0
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea ecx, [esp + 0x20]
push 1
push 1
push esi
call fcn.004e6420
add esp, 0xc
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov dword [esp + 4], eax
jmp 0x40581d
ud2