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

Disassembly:
sub esp, 0xec
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
cmp dword [ebp + 0xbe4], ebx
je 0x401e1b
cmp dword [0x4ab2e0], ebx
je 0x401e1b
mov eax, dword [ebp]
inc word [ebp + 0xa]
push esi
mov ecx, dword [ebp + 0xc]
push edi
mov edi, eax
neg edi
sbb edi, edi
mov esi, dword [ebp + 0x10]
and edi, 0x28
mov edx, esi
add edi, ecx
mov dword [esp + 0x14], ebx
add edi, dword [ebp + 0x14]
mov dword [esp + 0x10], ebx
mov word [esp + 0x1e], bx
mov word [esp + 0x1c], bx
mov dword [esp + 0x3c], edi
mov edi, dword [ebp + 0xbd4]
cmp edi, ebx
mov dword [esp + 0x20], ebx
mov word [esp + 0x28], bx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], 0xffff8001
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
jle 0x401d03
mov edx, dword [ebp + 0x3c]
mov edi, dword [ebp + 0x20]
mov dword [esp + 0x48], edx
mov edx, dword [ebp + 0x2c]
inc edi
imul edx, edi
mov edi, esi
add edx, edi
cmp eax, ebx
mov dword [esp + 0x40], edx
je 0x401b73
sub edx, esi
cmp edx, 0x78
jge 0x401b73
lea edx, [esi + 0x78]
mov dword [esp + 0x40], edx
cdq
and edx, 3
push 1
add eax, edx
push 8
sar eax, 2
sub ecx, eax
mov eax, dword [ebp + 4]
cdq
and edx, 3
sub ecx, 0x14
add eax, edx
mov dword [esp + 0x58], ecx
mov ecx, dword [0x4ab2e0]
mov word [esp + 0x76], 1
sar eax, 2
sub esi, eax
mov ax, word [ebp + 8]
mov word [esp + 0xfe], ax
sub esi, 0x14
lea eax, [esp + 0x38]
mov byte [esp + 0x73], 0xff
mov byte [esp + 0x74], bl
mov dword [esp + 0xf8], ebx
mov word [esp + 0xfc], 0xffff
mov byte [esp + 0x75], bl
mov dword [esp + 0x60], ebx
mov dword [esp + 0x5c], esi
mov edx, dword [ecx]
push eax
push 1
push ebx
call dword [edx + 0x48]
cmp word [ebp + 0xb8], bx
je 0x401c52
lea edi, [ebp + 0x54]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x70]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 1
mov eax, ecx
mov esi, edi
mov edi, edx
push 3
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x58]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x4ab2e0]
push 1
push ebx
mov edx, dword [ecx]
call dword [edx + 0x48]
movsx ecx, word [ebp + 0xa]
and ecx, 0x80000007
jns 0x401c3b
dec ecx
or ecx, 0xfffffff8
inc ecx
jne 0x401c41
inc word [ebp + 8]
mov dx, word [ebp + 8]
cmp dx, word [ebp + 0xb8]
jl 0x401c52
mov word [ebp + 8], bx
mov eax, dword [ebp + 0x40]
mov ecx, dword [esp + 0x34]
mov word [esp + 0x1c], bx
mov word [esp + 0x1e], 1
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], ecx
lea edi, [ebp + 0xc4]
movsx edx, word [esp + 0x1c]
mov eax, dword [ebp + 0x20]
push ebx
push 1
push edx
mov edx, dword [ebp + 0xbd4]
lea ecx, [esp + 0x58]
push eax
push ecx
push ebx
push edx
push edi
call fcn.00482d78
add esp, 0x20
test eax, eax
je 0x401cff
mov esi, dword [ebp + 0x20]
mov ecx, dword [ebp]
mov eax, esi
push ebx
imul eax, dword [esp + 0x50]
cdq
and edx, 3
add eax, edx
sar eax, 2
neg ecx
sbb ecx, ecx
and ecx, 0x50
sub ecx, eax
mov eax, dword [ebp + 0x14]
cdq
sub eax, edx
mov edx, dword [ebp + 0xc]
sar eax, 1
add ecx, eax
mov eax, dword [ebp + 0xbd4]
add ecx, edx
push eax
mov dword [esp + 0x18], ecx
mov ecx, dword [0x4ab2e0]
lea eax, [esp + 0x18]
push edi
mov edx, dword [ecx]
push eax
push esi
call dword [edx + 0x14]
mov ecx, dword [ebp + 0x20]
mov edx, dword [esp + 0x14]
inc word [esp + 0x1c]
lea eax, [edx + ecx + 1]
mov dword [esp + 0x14], eax
jmp 0x401c73
mov edx, dword [esp + 0x40]
mov eax, dword [ebp + 0xbd8]
pop edi
cmp eax, ebx
pop esi
jle 0x401d97
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x44]
inc eax
mov dword [esp + 0x2c], edx
imul eax, dword [ebp + 0x30]
mov dword [esp + 0x40], ecx
mov ecx, dword [0x4ab2e0]
add edx, eax
push 1
lea eax, [esp + 0x2c]
push 8
mov dword [esp + 0x40], edx
mov edx, dword [ecx]
push eax
push 1
push ebx
call dword [edx + 0x48]
mov ecx, dword [ebp + 0x48]
mov eax, dword [ebp + 0x1c]
mov dx, word [ebp + 0x30]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp + 0xc]
mov word [esp + 0x16], dx
mov edx, dword [esp + 0x2c]
add ecx, eax
mov dword [esp + 8], ecx
lea ecx, [esp + 8]
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 0x20]
push ecx
mov ecx, dword [ebp + 0x14]
add eax, eax
push edx
mov edx, dword [ebp + 0xbd8]
sub ecx, eax
push ecx
lea eax, [ebp + 0x7cc]
push edx
push eax
mov word [esp + 0x28], bx
call fcn.00402f20
mov edx, dword [esp + 0x4c]
add esp, 0x14
cmp dword [ebp + 0xbdc], ebx
jle 0x401e1b
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x4c]
inc eax
mov dword [esp + 0x2c], edx
imul eax, dword [ebp + 0x34]
mov dword [esp + 0x40], ecx
mov ecx, dword [0x4ab2e0]
add edx, eax
push 1
lea eax, [esp + 0x2c]
push 8
mov dword [esp + 0x40], edx
mov edx, dword [ecx]
push eax
push 1
push ebx
call dword [edx + 0x48]
mov ecx, dword [ebp + 0x50]
mov eax, dword [ebp + 0x1c]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp + 0xc]
add eax, ecx
mov ecx, dword [esp + 0x2c]
mov dx, word [ebp + 0x34]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xbdc]
push ebx
push eax
lea eax, [ebp + 0x9d0]
push eax
mov dword [esp + 0x18], ecx
mov ecx, dword [0x4ab2e0]
lea eax, [esp + 0x14]
push eax
mov eax, dword [ebp + 0x20]
mov word [esp + 0x24], bx
mov word [esp + 0x26], dx
mov edx, dword [ecx]
push eax
call dword [edx + 0x14]
pop ebp
pop ebx
add esp, 0xec
ret