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

Disassembly:
sub esp, 0x850
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x34], esi
mov edi, dword [esi + 0x78]
sar edi, 2
push edi
mov dword [esp + 0x40], edi
call fcn.0040f300
mov ebp, dword [esi + 0x7c]
xor edx, edx
mov eax, 0xffff8300
cmp ebp, edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x10], esi
mov dword [esi + 0x7c], edx
je 0x40f190
jmp 0x40ec01
mov eax, dword [esp + 0x1c]
xor edx, edx
cmp dword [ebp + 0xc], edx
je 0x40f0b3
mov ecx, dword [ebp]
mov dword [esp + 0x40], edx
mov esi, ecx
and ecx, 3
mov edi, ecx
mov ecx, dword [ebp + 4]
mov ebx, ecx
and ecx, 3
sar esi, 2
sar ebx, 2
cmp esi, ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x44], ebx
mov dword [esp + 0x38], ecx
jne 0x40ed27
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x28]
push eax
push ecx
push esi
mov ecx, ebp
call fcn.0040d760
mov eax, dword [esp + 0x38]
sub eax, edi
mov edi, eax
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x40ed06
cmp word [esp + 0x1a], 0
je 0x40ecf8
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
shr ecx, 4
and ecx, 0xff00ff
mov dword [esp + 0x38], eax
shr edx, 4
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x10]
and edx, 0xff00ff
cmp word [esp + 0x1a], 0xff
mov dword [esp + 0x14], edx
mov ebx, ecx
jne 0x40ecb7
lea edx, [esp + 0x14]
push edx
lea edx, [eax + 1]
push edx
push eax
push ecx
call dword [ecx + 0x124]
add esp, 0x10
jmp 0x40ecf8
lea edx, [eax + 1]
mov dword [esp + 0x24], edx
lea edx, [esp + 0x50]
push edx
mov edx, dword [esp + 0x28]
push edx
push eax
push ecx
call dword [ecx + 0x12c]
lea eax, [esp + 0x60]
lea ecx, [esp + 0x24]
push eax
push ecx
call fcn.0040f1a0
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x50]
lea edx, [esp + 0x68]
push edx
push eax
push ecx
push ebx
call dword [ebx + 0x124]
add esp, 0x28
xor eax, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov edx, edi
imul edi, dword [esp + 0x2c]
imul edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
add ecx, edx
add eax, edi
mov dword [esp + 0x14], ecx
jmp 0x40f0ab
cmp edi, edx
je 0x40ee33
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x28]
push eax
push ecx
push esi
mov ecx, ebp
call fcn.0040d760
mov eax, dword [esp + 0x1c]
mov ebx, 4
sub ebx, edi
cmp eax, esi
mov dword [esp + 0x40], 1
je 0x40ee04
cmp word [esp + 0x1a], 0
je 0x40edf4
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
shr ecx, 4
and ecx, 0xff00ff
mov dword [esp + 0x30], eax
shr edx, 4
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x10]
and edx, 0xff00ff
cmp word [esp + 0x1a], 0xff
mov dword [esp + 0x14], edx
mov edi, ecx
jne 0x40edb3
lea edx, [esp + 0x14]
push edx
lea edx, [eax + 1]
push edx
push eax
push ecx
call dword [ecx + 0x124]
add esp, 0x10
jmp 0x40edf4
lea edx, [eax + 1]
mov dword [esp + 0x24], edx
lea edx, [esp + 0x48]
push edx
mov edx, dword [esp + 0x28]
push edx
push eax
push ecx
call dword [ecx + 0x12c]
lea eax, [esp + 0x58]
lea ecx, [esp + 0x24]
push eax
push ecx
call fcn.0040f1a0
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x48]
lea edx, [esp + 0x60]
push edx
push eax
push ecx
push edi
call dword [edi + 0x124]
add esp, 0x28
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov eax, esi
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x28]
mov ecx, ebx
imul ecx, edx
mov edi, dword [esp + 0x14]
add edi, ecx
mov ecx, dword [esp + 0x2c]
imul ebx, ecx
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x18]
add edi, ebx
mov ebx, dword [esp + 0x44]
inc esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x30], esi
jmp 0x40ee3b
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
cmp esi, ebx
jge 0x40efb8
mov al, byte [ebp + 0x11]
test al, al
je 0x40ee8a
cmp dword [ebp + 0xc], 4
jne 0x40ee8a
mov al, byte [ebp + 0x12]
test al, al
je 0x40ee75
mov ecx, dword [esp + 0x34]
xor edx, edx
mov dl, byte [ebp + 0x13]
lea eax, [ebp + 0x18]
push edx
push eax
push ebx
push esi
call fcn.0040e2f0
mov eax, dword [esp + 0x1c]
jmp 0x40efb8
mov eax, dword [ebp + 0x18]
push ebx
push esi
push eax
call dword [eax + 0x18]
mov eax, dword [esp + 0x28]
add esp, 0xc
jmp 0x40efb8
mov edi, esi
mov dword [esp + 0x24], edi
jmp 0x40eea2
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x44]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
lea eax, [edi + 0x100]
cmp ebx, eax
jl 0x40eeae
mov ebx, eax
mov al, byte [ebp + 0x10]
test al, al
je 0x40eefc
cmp edi, ebx
lea esi, [esp + 0x60]
jge 0x40ef68
mov ecx, dword [esp + 0x3c]
push esi
push ecx
push edi
mov ecx, ebp
call fcn.0040d760
mov edx, dword [esi]
mov eax, dword [esi + 4]
shr edx, 2
shr eax, 2
and edx, 0xff00ff
and eax, 0xff00ff
mov dword [esi], edx
mov dword [esi + 4], eax
inc edi
add esi, 8
cmp edi, ebx
jl 0x40eec1
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x24]
jmp 0x40ef6c
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x40ef2a
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x28]
push ecx
push edx
push esi
mov ecx, ebp
call fcn.0040d760
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x40], 1
shr ecx, 2
and ecx, 0xff00ff
lea eax, [esp + 0x68]
shr edx, 2
mov dword [esp + 0x64], ecx
lea ecx, [edi + 1]
and edx, 0xff00ff
cmp ecx, ebx
mov dword [esp + 0x60], edx
jge 0x40ef6c
mov edx, ebx
sub edx, ecx
mov ecx, dword [esp + 0x60]
mov dword [eax], ecx
mov ecx, dword [esp + 0x64]
mov dword [eax + 4], ecx
add eax, 8
dec edx
jne 0x40ef53
jmp 0x40ef6c
mov esi, dword [esp + 0x30]
cmp dword [ebp + 0xc], 4
jne 0x40ef90
mov al, byte [ebp + 0x12]
test al, al
jne 0x40ef90
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x60]
push edx
push ebx
push edi
push eax
call dword [eax + 0x124]
add esp, 0x10
jmp 0x40efa0
mov ecx, dword [esp + 0x34]
lea eax, [esp + 0x60]
push eax
push ebx
push edi
call fcn.0040c550
mov eax, dword [esp + 0x44]
mov dword [esp + 0x24], ebx
cmp ebx, eax
jl 0x40ee92
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x44]
mov edi, dword [esp + 0x38]
test edi, edi
je 0x40f0af
mov cl, byte [ebp + 0x10]
test cl, cl
jne 0x40efd3
mov ecx, dword [esp + 0x40]
test ecx, ecx
jne 0x40efe9
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x28]
push ecx
push edx
push ebx
mov ecx, ebp
call fcn.0040d760
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40f08d
cmp word [esp + 0x1a], 0
je 0x40f07f
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
shr ecx, 4
and ecx, 0xff00ff
mov dword [esp + 0x30], eax
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x18]
shr ecx, 4
and ecx, 0xff00ff
mov dword [esp + 0x18], ecx
cmp word [esp + 0x1a], 0xff
jne 0x40f046
lea ecx, [esp + 0x14]
lea edx, [eax + 1]
push ecx
push edx
push eax
push esi
call dword [esi + 0x124]
add esp, 0x10
jmp 0x40f07f
lea ecx, [esp + 0x58]
lea edi, [eax + 1]
push ecx
push edi
push eax
push esi
call dword [esi + 0x12c]
lea edx, [esp + 0x68]
lea eax, [esp + 0x24]
push edx
push eax
call fcn.0040f1a0
mov edx, dword [esp + 0x48]
lea ecx, [esp + 0x70]
push ecx
push edi
push edx
push esi
call dword [esi + 0x124]
mov edi, dword [esp + 0x60]
add esp, 0x28
xor eax, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
imul eax, edi
add ecx, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x2c]
imul ecx, edi
add eax, ecx
mov dword [esp + 0x18], eax
mov esi, dword [esp + 0x34]
mov edi, dword [ebp + 8]
push ebp
lea ecx, [esi + 0xa4]
call fcn.00406ce0
test edi, edi
mov ebp, edi
jne 0x40ebfb
cmp word [esp + 0x1a], di
je 0x40f190
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
shr eax, 4
and eax, 0xff00ff
mov edi, ecx
shr edx, 4
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
and edx, 0xff00ff
cmp word [esp + 0x1a], 0xff
mov dword [esp + 0x14], edx
mov ebx, eax
jne 0x40f12c
lea edx, [esp + 0x14]
push edx
lea edx, [eax + 1]
push edx
push eax
push ecx
call dword [ecx + 0x124]
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x850
ret
lea edx, [esp + 0x28]
lea esi, [eax + 1]
push edx
push esi
push eax
push ecx
call dword [ecx + 0x12c]
mov ecx, dword [esp + 0x2a]
mov edx, dword [esp + 0x38]
and ecx, 0xffff
mov eax, 0x100
sub eax, ecx
mov ebp, dword [esp + 0x28]
imul edx, eax
imul eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x24]
shr eax, 8
add eax, ebp
and eax, 0xff00ff
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x38]
shr edx, 8
add edx, ecx
push eax
push esi
and edx, 0xff00ff
push ebx
push edi
mov dword [esp + 0x48], edx
call dword [edi + 0x124]
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x850
ret