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

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
mov esi, dword [esp + 0x38]
push edi
mov edi, dword [esp + 0x40]
mov eax, dword [esi]
imul ebp, dword [esi + 0x1c], 0x14
mov ecx, dword [edi + 0x44]
mov ebx, dword [edi + 0x48]
mov dword [esp + 0x18], eax
add ebx, ecx
mov eax, dword [edi + 0x1c8]
add ebp, dword [esi + 4]
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x1a4]
mov dword [esp + 0x3c], eax
imul eax, dword [esi + 0x20], 0x14
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], ebx
add eax, dword [esi + 4]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x3c]
push eax
push esi
call fcn.00490e7b
xor eax, eax
pop ecx
inc eax
cmp byte [edi + 0x158], 0
pop ecx
je 0x4af83c
cmp byte [edi + 0x159], 0
jne 0x4af83e
xor al, al
mov byte [esi + 0x67], al
cmp byte [edi + 0x1e4], 0
je 0x4af856
push 0xa
pop eax
cmp ebx, eax
cmovl ebx, eax
mov dword [esp + 0x14], ebx
mov edi, dword [esp + 0x10]
mov eax, edi
sub eax, ebp
push eax
push 0
push ebp
call fcn.004bf040
mov eax, ebp
mov byte [esi + 0x63], 0
and eax, 7
add esp, 0xc
add ebp, eax
imul eax, ebx, 0x28
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x24], eax
imul eax, dword [esp + 0x20], 0x28
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x3c]
shl eax, 2
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x20]
shl eax, 2
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
shl eax, 2
mov dword [esp + 0x34], eax
and dword [esp + 0x3c], 0
lea eax, [esp + 0x3c]
push eax
push edi
lea eax, [esp + 0x18]
push eax
push ebx
push dword [esi + 8]
call fcn.0047d5d9
mov dword [esi + 8], eax
lea eax, [esp + 0x50]
push eax
push edi
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x48]
push dword [esi + 0x48]
call fcn.0047d5d9
mov dword [esi + 0x48], eax
lea eax, [esp + 0x64]
push eax
push edi
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x60]
push dword [esi + 0xc]
call fcn.0047d5d9
mov dword [esi + 0xc], eax
lea eax, [esp + 0x78]
push eax
push edi
lea eax, [esp + 0x54]
push eax
push dword [esp + 0x78]
push dword [esi + 0x4c]
call fcn.0047d5d9
add esp, 0x50
mov dword [esi + 0x4c], eax
lea eax, [esp + 0x3c]
push eax
push edi
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x40]
push dword [esi + 0x44]
call fcn.0047d5d9
mov ecx, dword [esp + 0x50]
add esp, 0x14
mov dword [esi + 0x44], eax
test ecx, ecx
je 0x4af957
push ecx
push ebp
call fcn.0049833a
pop ecx
pop ecx
mov ecx, dword [esp + 0x3c]
mov dword [esi + 0xa4], eax
mov eax, dword [esi + 0xa4]
mov dword [esp + 0x10], eax
lea edi, [ecx + eax]
test ecx, ecx
je 0x4af972
cmp byte [ebp + 0x1e], 0
je 0x4af8b2
cmp dword [esi + 0x48], 0
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x40]
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x20]
mov word [esi + 0x32], ax
je 0x4af9b5
mov word [esi + 0x50], bp
test ebp, ebp
jle 0x4af9b5
mov edx, dword [esp + 0x18]
xor ebx, ebx
xor ecx, ecx
inc ebx
mov eax, dword [esi + 0x48]
mov word [ecx + eax + 0x1c], bx
mov eax, dword [esi + 0x48]
mov dword [ecx + eax], edx
lea ecx, [ecx + 0x28]
dec ebp
jne 0x4af99d
mov ebx, dword [esp + 0x14]
cmp dword [esi + 0x4c], 0
je 0x4af9f3
movzx eax, word [edi + 0x1cc]
mov word [esi + 0x52], ax
cwde
shl eax, 2
push eax
push dword [edi + 0x1d0]
push dword [esi + 0x4c]
call fcn.004be9f0
mov eax, dword [edi + 0x1cc]
shl eax, 2
push eax
push 0
push dword [edi + 0x1d0]
call fcn.004bf040
add esp, 0x18
mov eax, dword [esi + 8]
test eax, eax
je 0x4afa25
xor ebp, ebp
mov dword [esi + 0x18], ebx
add eax, 0xffffffd8
inc ebp
mov dword [esi + 8], eax
cmp ebx, ebp
jl 0x4afa25
mov edx, dword [esp + 0x18]
push 0x28
pop ecx
mov eax, dword [esi + 8]
mov word [ecx + eax + 0x1c], bp
mov eax, dword [esi + 8]
mov dword [ecx + eax], edx
lea ecx, [ecx + 0x28]
dec ebx
jne 0x4afa11
mov al, byte [edi + 0x1e4]
push esi
mov byte [esi + 0x61], al
call fcn.004b0b9c
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret