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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x50
mov esi, dword [esp + 0x64]
mov dword [esp + 8], ecx
call 0x4af484
pop eax
mov dword [esp + 4], edx
mov dword [esp + 0x2c], eax
mov edi, dword [esi]
mov ecx, dword [esi + 8]
mov eax, edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x24], ecx
sub eax, ecx
cmp eax, 0x20
mov eax, esi
jae 0x4af4d7
lea ecx, [esp + 0xc]
push eax
call fcn.004af9e0
add esp, 4
movzx eax, byte [esp + 0xc]
cmp al, 4
jne 0x4af94c
cmp dword [esp + 0x10], 0
je 0x4af96c
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 4]
mov edi, dword [eax]
mov ecx, dword [eax + 8]
xor esi, esi
mov dword [esp + 0x20], 0x2000
cmp ecx, edi
jne 0x4af519
cmp edi, dword [esp + 0x40]
jne 0x4af519
lea ecx, [esp + 0xc]
push eax
call fcn.004af9e0
add esp, 4
movzx eax, byte [esp + 0xc]
cmp al, 4
jne 0x4af94c
cmp dword [esp + 0x10], 0
je 0x4af987
mov eax, dword [esp + 0x64]
mov edi, dword [eax]
mov ecx, dword [eax + 8]
cmp ecx, edi
jne 0x4af560
cmp edi, 0xffffffdf
ja 0x4af97c
mov edx, edi
add edi, 0x20
lea eax, [edx + edx]
cmp eax, edi
cmova edi, eax
mov eax, dword [esp + 0x64]
test edi, edi
js 0x4af97c
mov ebp, ecx
test edx, edx
je 0x4af565
mov eax, dword [eax + 4]
mov dword [esp + 0xc], eax
mov eax, 1
mov dword [esp + 0x14], edx
jmp 0x4af567
mov edx, dword [eax + 4]
jmp 0x4af59c
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [esp + 0xc]
lea ecx, [esp + 0x44]
mov edx, 1
push eax
push edi
call fcn.00413aa0
add esp, 8
cmp dword [esp + 0x44], 1
je 0x4af97c
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x64]
mov ecx, ebp
mov dword [eax + 4], edx
mov dword [eax], edi
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x3c], edi
sub edi, ecx
add edx, ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x38], edi
mov dword [esp + 0x18], edx
cmp edi, ebp
cmovb ebp, edi
mov eax, ebp
sub eax, esi
add esi, edx
push eax
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov edx, dword [esp + 4]
mov edi, dword [edx + 0x78]
mov esi, dword [edx + 0x74]
mov ecx, edi
sub ecx, esi
jne 0x4af610
lea ecx, [esp + 0xc]
call fcn.004ae620
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
test byte [esp + 0xc], 1
je 0x4af630
mov edx, dword [esp + 4]
cmp al, 4
je 0x4af6ae
xor edi, edi
mov ebx, eax
jmp 0x4af6c4
mov eax, dword [edx + 0x6c]
add eax, esi
cmp ecx, ebp
cmovae ecx, ebp
cmp ecx, 1
mov dword [esp + 0x1c], ecx
jne 0x4af650
movzx eax, byte [eax]
mov ecx, dword [esp + 0x18]
mov byte [ecx], al
jmp 0x4af662
cmp ecx, ebp
cmovae ecx, ebp
cmp ecx, 1
jne 0x4af67b
movzx eax, byte [eax]
mov edx, dword [esp + 0x18]
mov edi, ecx
mov byte [edx], al
jmp 0x4af68b
push ecx
push eax
push dword [esp + 0x20]
call sub.VCRUNTIME140.dll_memcpy
mov edx, dword [esp + 0x10]
add esp, 0xc
mov ecx, dword [esp + 0x1c]
add esi, ecx
cmp esi, edi
cmovae esi, edi
mov eax, 4
mov dword [edx + 0x74], esi
cmp al, 4
jne 0x4af5ff
jmp 0x4af6ae
push ecx
push eax
push dword [esp + 0x20]
mov edi, ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov edx, dword [esp + 4]
mov ecx, edi
mov esi, dword [edx + 0x74]
mov eax, dword [edx + 0x78]
add esi, edi
cmp esi, eax
cmovae esi, eax
mov eax, 4
mov dword [edx + 0x74], esi
cmp al, 4
jne 0x4af5ff
cmp ecx, ebp
ja 0x4af9b5
mov edi, ecx
mov ecx, dword [esp]
and ebx, 0xffffff00
or ebx, 4
movzx eax, bl
mov dword [esp + 0x30], ebp
mov eax, dword [eax*4 + 0x4af9b8]
add eax, dword [esp + 0x2c]
jmp eax
movzx ecx, byte [esp + 0xf]
mov edx, dword [esp + 8]
movzx edi, word [esp + 0xd]
mov esi, dword [esp + 0x10]
mov byte [edx + 3], cl
mov word [edx + 1], di
mov byte [edx], al
mov dword [edx + 4], esi
jmp 0x4af99c
mov eax, dword [esp + 8]
mov dword [eax + 4], 0
mov byte [eax], 4
jmp 0x4af99c
mov eax, dword [esp + 8]
mov word [eax], 0x2601
jmp 0x4af99c
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 8]
mov eax, dword [eax + 8]
sub eax, dword [esp + 0x24]
mov dword [ecx + 4], eax
mov byte [ecx], 4
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret
ud2