Function at 0x40eb90
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.0040f2e0
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 0x40f170
jmp 0x40ebe1
mov eax, dword [esp + 0x1c]
xor edx, edx
cmp dword [ebp + 0xc], edx
je 0x40f093
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 0x40ed07
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x28]
push eax
push ecx
push esi
mov ecx, ebp
call fcn.0040d740
mov eax, dword [esp + 0x38]
sub eax, edi
mov edi, eax
mov eax, dword [esp + 0x1c]
cmp eax, esi
je 0x40ece6
cmp word [esp + 0x1a], 0
je 0x40ecd8
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 0x40ec97
lea edx, [esp + 0x14]
push edx
lea edx, [eax + 1]
push edx
push eax
push ecx
call dword [ecx + 0x124]
add esp, 0x10
jmp 0x40ecd8
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.0040f180
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 0x40f08b
cmp edi, edx
je 0x40ee13
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x28]
push eax
push ecx
push esi
mov ecx, ebp
call fcn.0040d740
mov eax, dword [esp + 0x1c]
mov ebx, 4
sub ebx, edi
cmp eax, esi
mov dword [esp + 0x40], 1
je 0x40ede4
cmp word [esp + 0x1a], 0
je 0x40edd4
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 0x40ed93
lea edx, [esp + 0x14]
push edx
lea edx, [eax + 1]
push edx
push eax
push ecx
call dword [ecx + 0x124]
add esp, 0x10
jmp 0x40edd4
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.0040f180
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 0x40ee1b
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
cmp esi, ebx
jge 0x40ef98
mov al, byte [ebp + 0x11]
test al, al
je 0x40ee6a
cmp dword [ebp + 0xc], 4
jne 0x40ee6a
mov al, byte [ebp + 0x12]
test al, al
je 0x40ee55
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.0040e2d0
mov eax, dword [esp + 0x1c]
jmp 0x40ef98
mov eax, dword [ebp + 0x18]
push ebx
push esi
push eax
call dword [eax + 0x18]
mov eax, dword [esp + 0x28]
add esp, 0xc
jmp 0x40ef98
mov edi, esi
mov dword [esp + 0x24], edi
jmp 0x40ee82
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 0x40ee8e
mov ebx, eax
mov al, byte [ebp + 0x10]
test al, al
je 0x40eedc
cmp edi, ebx
lea esi, [esp + 0x60]
jge 0x40ef48
mov ecx, dword [esp + 0x3c]
push esi
push ecx
push edi
mov ecx, ebp
call fcn.0040d740
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 0x40eea1
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x24]
jmp 0x40ef4c
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x40ef0a
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x28]
push ecx
push edx
push esi
mov ecx, ebp
call fcn.0040d740
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 0x40ef4c
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 0x40ef33
jmp 0x40ef4c
mov esi, dword [esp + 0x30]
cmp dword [ebp + 0xc], 4
jne 0x40ef70
mov al, byte [ebp + 0x12]
test al, al
jne 0x40ef70
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 0x40ef80
mov ecx, dword [esp + 0x34]
lea eax, [esp + 0x60]
push eax
push ebx
push edi
call fcn.0040c530
mov eax, dword [esp + 0x44]
mov dword [esp + 0x24], ebx
cmp ebx, eax
jl 0x40ee72
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x44]
mov edi, dword [esp + 0x38]
test edi, edi
je 0x40f08f
mov cl, byte [ebp + 0x10]
test cl, cl
jne 0x40efb3
mov ecx, dword [esp + 0x40]
test ecx, ecx
jne 0x40efc9
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x28]
push ecx
push edx
push ebx
mov ecx, ebp
call fcn.0040d740
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40f06d
cmp word [esp + 0x1a], 0
je 0x40f05f
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 0x40f026
lea ecx, [esp + 0x14]
lea edx, [eax + 1]
push ecx
push edx
push eax
push esi
call dword [esi + 0x124]
add esp, 0x10
jmp 0x40f05f
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.0040f180
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.00406cc0
test edi, edi
mov ebp, edi
jne 0x40ebdb
cmp word [esp + 0x1a], di
je 0x40f170
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 0x40f10c
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